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.

CommentFileSizeAuthor
Snap 2014-04-08 at 23.28.29.png28.02 KBthim
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aspilicious’s picture

Status: Active » Postponed (maintainer needs more info)

I think I fixed some issues with class merging a few months agao. Can you try latest dev?

swentel’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

No answer after several months, closing.

bessone’s picture

Version: 7.x-2.6 » 7.x-2.x-dev
Status: Closed (works as designed) » Active

The problem still exists also in the last 7.x-2.x-dev (2015-Jan-30)

csedax90’s picture

The problem still exists on 8.2

csedax90’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev
swentel’s picture

swentel’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.