The idea for this came from this discussion: #348664: Jump to the start of the text immediately after teaser
It would be useful to provide an anchor tag in the node that demarcates the division between teaser and full node. For example, say the <!-- break --> tag were inserted like this:
This is the last line of the teaser.
<!-- break -->
This is the first line after the teaser.
Viewing the full node would replace the <!-- break --> tag with an anchor:
This is the last line of the teaser.
<a id="read_more" name="read_more"></a>
This is the first line after the teaser.
This would allow users to "jump" to the content they haven't read yet when clicking a "read more" link. This would be most valuable for "read more" links that appear immediately after the text of the teaser (as opposed to the node $links). Some modules -- Read More link, for example -- could utilize this.
Comments
Comment #1
jody lynnI like the idea, but we now use summary fields for teasers, and there is nothing to guarantee that an instance would have only one summary field. That makes it challenging to give unique id's for the target link (as we also can't be sure that there would only be one such target id per page).
Comment #2
alan d. commentedThe anchor name attribute is obsolete in HTML5. Refs:
http://www.w3.org/TR/2012/WD-html5-20120329/the-a-element.html
http://dev.w3.org/html5/markup/a.html
Anyways, extending on the first comment, the question remains on what fields are showing on the page and what ones are showing on the teaser. What fields are formatted differently from the teaser / full view, ..., etc. There are no guarantees that there is even a body field!
I think that the best we can do would be to add an inline span with the id to match at the break point, something like: "$entity_type-$entity_id-$field_name-$delta" or similar. But this would be a setting on the full view display that defines this.
i.e. There can be multiple "teaser" views linking to the full view mode and these could all have different display settings like trim length, so this could be the best we could do :(
Comment #3
xjm(Merging "node system" and "node.module" components for 8.x; disregard.)
Comment #17
smustgrave commentedThank you for sharing your idea for improving Drupal.
We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #18
acbramley commentedI can't think of a feasible way to do this given the unknowns of both the teaser display and the full display of any given node. Given the age of the issue I'm going to close this.