When creating a readmore link like this "Read more >" with a CSS-arrow implementation, i've added a readmore class to the Views > Node: link.
But there seems to be an HTML-output bug in the Views Module.
Implementation:
Fields > Node: title
- Exclude from display
- Link this field to its node
Fields > Node: link
- Exclude from display
- Output this field as a link
- (Link path "nieuwsbericht/[title]")
- (Link class "readmore")
- (Text to display "Read more")
Fields > Global: Custom text
- Text: "[view_node]"
HTML Output:
<a href="/en/path/to/node/title%20of%20node" class="readmore"><a href="/en/path/to/node/title-of-node">Read more</a></a>
You can see that there are TWO anchors as HTML-output, instead of one combined output.
The first link is showing the URL with spaces, and the second - and correct - one with the dashes format.
Only the first - incompleted - anchor has the 'readmore' class addition.
My presentation output is "> Read more".
Probably a small bug, but maybe it has to do with the fact that the [title] has the property "Link this field to its node" enabled.
Kind regards,
--
dpdk
P.S. running on all latest versions of Drupal core and Modules.
Comments
Comment #1
dpdk commentedUpdated intel:
It has nothing to do with the [title] property "Link this field to its node".
The HTML-output stays correct for a Block-view, but is incorrectly rendered by a Page-view implementation.
Comment #2
dpdk commentedProblem solved:
The problem occures when you have a "Fields > Node: link" with an activated property of "Link this field to its node".
So the output that's created is a "Link this field to its node" anchor, within the normal "link" (anchor).