When adding the default "Read More" field ($fields['node']['node_link']) to a region, you can set different settings.
This then generates a link with a text (like in the settings).
You set add a wrapper and class to it.
I wanted to add a class to my link self, but it doesnt take any of the class values entered unless there is a wrapper entered?
When looking in the function ds_render_field($field), it became clear why:
// Wrapper and class.
if (!empty($settings['wrapper'])) {
$wrapper = check_plain($settings['wrapper']);
$class = (!empty($settings['class'])) ? ' class="' . check_plain($settings['class']) . '"' : '';
$output = '<' . $wrapper . $class . '>' . $output . '';
}
Not sure if this is a bug or feature request, or just misconfiguration from my side.
Comment | File | Size | Author |
---|---|---|---|
Snap 2014-04-08 at 23.28.29.png | 28.02 KB | thim |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedI think I fixed some issues with class merging a few months agao. Can you try latest dev?
Comment #2
swentel CreditAttribution: swentel commentedNo answer after several months, closing.
Comment #3
bessone CreditAttribution: bessone commentedThe problem still exists also in the last 7.x-2.x-dev (2015-Jan-30)
Comment #4
csedax90 CreditAttribution: csedax90 commentedThe problem still exists on 8.2
Comment #5
csedax90 CreditAttribution: csedax90 commentedComment #6
swentel CreditAttribution: swentel as a volunteer commentedThis should be fine since #2820599: \Drupal\ds\Plugin\DsField\Field creates HTML manually
Comment #7
swentel CreditAttribution: swentel as a volunteer commented