I have a node where the teaser and body are the same. A "read more" link is not desirable in this circumstance.
This is happening because the teaser is filtered but the body is not. See this dpm output for the case:
teaser: <p>The world is full of bullies and frauds.</p>
body: The world is full of bullies and frauds.
In my previous patch at #235382, I made the comparison at $op = 'load' and it worked fine, but looking at that a little more closely, it was just allowing the normal node_view calculation for the readmore property to rule. If the teaser were longer than the body, you'd not see the read more link.
This patch fixes it by calculating readmore on load and storing the boolean in a static variable for the excerpt_nodeapi function. Then in view, it overwrites the readmore property with the stored value.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | excerpt.module.patch | 1.36 KB | smk-ka |
| #1 | excerpt.module.patch | 1013 bytes | smk-ka |
| excerpt-readmore.patch | 1.23 KB | Anonymous (not verified) |
Comments
Comment #1
smk-ka commentedI'm not sure if nodeapi is always called in this set order, ie. if nodes are always loaded and immediately viewed thereafter, with no other node load inbetween. Let's play safe and store the readmore status in a node property, which we copy over on "view".
Comment #2
smk-ka commentedRevised patch adding support for nodes that were saved with earlier versions of excerpt (when teasers were still generated on load). I know it's a bit offtopic, however you seem to be interested in getting out a stable release of this module, so I just put it here.
Comment #3
smk-ka commentedThis has been committed.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.