Hi,

I just installed this module, hoping to alter the system more links in a flexible way, but it only lets me have a custom more link in the teaser body or keep the system one in the links area, unchanged (although it's still a cool module). So, I just added some options to it so you can apply all the configuration to the system generated more links also. (I guess this also avoids some compatibility issues with other modules when add to the teaser text).

I also wanted to be able to add a fragment to the more link, so if the full text also contains the teaser, the viewer can go straight to the new bit of text when the node page loads, without having to scroll down and look for where they left off (which is very annoying). So I added that feature too. You just need to set a p, span, or whatever else tag with the chosen fragment id name in the full text, where you want the viewer be taken to after clicking 'read more'.

I've tested it on my site www.healthylovingrelationships.com and it seems to work like a charm.

Here's the patched module in a zip file.

cheers,
Joe

CommentFileSizeAuthor
ed_readmore.zip10.41 KBjoehudson

Comments

todd nienkerk’s picture

Title: fragment addition and altering system more links » Fragment addition and altering system more links
Status: Needs review » Closed (won't fix)

Joe: I think this is a very interesting suggestion. Thank you for your time and contribution.

This is a feature I've been considering for some time. The best long-term solution for this feature -- and the Read More link modules as a whole -- is to create an input filter that defines a tag that be added to a teaser: <!-- readmore -->. Not only would this allow the "read more" link to be added to the teaser at the precise point specified by the user, but it would also add an anchor to the full node view that directs the user to the point at which the teaser ended: <a name="continue"></a>.

Please feel free to provide your thoughts and guidance. Meanwhile, I will mark this specific issue "won't fix," as we should consider the solution I've outlined above.

todd nienkerk’s picture

For reference, here are the related issues:

Duplicate issue: #348664: Jump to the start of the text immediately after teaser
Feature request for Drupal 7.x core: #429528: Add an anchor tag in place of the break tag when viewing full node

joehudson’s picture

Hi Todd,

your suggestion seems like a clean solution. It might also but handy to allow the read more link to stay in it's current position, as an option. personally I think it looks quite neat there. If the

comment could be used to generate a standard 'read more' link in the standard position, break the text at that point (rather than necessarily have it in the text area), then that would be a nice solution. Sometimes of course you want the teaser to be totally different from the full article (e.g. a summary with key points), in which case you could have a tick box to make the link go to the top of the page.

I don't think my alterations change any of the existing features, they simply add more.

In any case, it works as I want it now and I suppose if anyone wants the same features they'll find this post, hopefully.

cheers,
Joe