Finally... my Read More link woes fixed? In Tweaking the Read More Tweak, I noted that I used the Read More Tweak module to make Drupal's strangely-invisible Read More links more prominent. But that module opened up another problem: the Read More link was appearing even when there was no more content, i.e., when the teaser showed the whole of the node.
The issues queue for the module discusses the matter, ending with confirmation that the latest version fixes things. Yet I kept getting that link after every teaser, whether for new posts or edits of old posts. Recent testing revealed something else: Somewhere along the line of upgrades and experiments, that module had stopped being at fault; I was now getting that persistent link in every teaser even with Read More Tweak disabled.
Things are fixed now. It's all so simple as to be embarrassing:
I was using trimmed posts (i.e., automated teaser cut-offs), set at Administer » Content management » Post settings. When I wanted to instead cut off the teaser at a different point, I used the Page Break button in Tiny TinyMCE, per its instructions ("Use the Page Break button* to insert a Drupal teaser break"). That page break setting takes precedence over the automated trimmed post setting.
I did the same thing when I wanted the whole node to appear as the teaser: I applied the page break to the end of the node's content. I'm pretty sure I somewhere read that this is the canonical method to set the whole node as the teaser when trimmed posts are being used.
But maybe I misread, as this seems to be what was causing my problem. Placing that page break at the end of the node ensures the appearance of the Read More link, even though that's precisely when we don't want it to appear.
Here's the recipe that's working:
- Set length of trimmed posts to Unlimited. (That sets no teaser trimming by default.)
- For posts that should have trimmed teasers, set a page break as above.
- For posts whose teaser should be the whole node, do nothing special. Don't touch the Page Break button.
That's it. New posts now behave, as do old posts when re-edited. And as should be, this is all separate from the Read More Tweak module; the behavior is now correct with or without that module's action of making the link more prominent. I think the above is the recipe I'll use for all sites now.
Done! A very beginner-level mistake and fix – but hey, that's what this blog is for.
* Side note: "Page Break button" is a poor name for a button that inserts a teaser break. Actual page breaks are the province of pagination features.
I have heard and read stories such as this one before, and their common denominator is Drupal...
excellent tip - can highly recommend the module - installed and working perfectly in drupal 7
This book seems very interesting as I am currently starting a project to build a community site...
Thank you very much !
Thank you very much !