Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Read more link in feed
Hello!
If there’s an excerpt for an article, the excerpt is used in the feed. But the thing is, that nobody sees that this is only an excerpt. So I want to place an “read more…” in the feed.
How can I do that?
Thanks in advance!
Best regards!
Offline
Re: Read more link in feed
I think the link would need to be a part of the excerpt itself rather than part of the form template.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Read more link in feed
Hmm, the thing is, that I don’t now the exact link when I’m writing the excerpt. So it must be part of the template!?
Offline
Re: Read more link in feed
No. As it is still a part of the article I believe the <txp:permlink></txp:permlink>
tag should pick up the correct link.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Read more link in feed
Ok, that works pretty good. But I don’t want to add every time manally this link :(
Offline
Re: Read more link in feed
Also do you use the excerpts on-site or is this just for the feed?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Read more link in feed
Both :)
Offline
Re: Read more link in feed
Mmmm. It’s OK. I was just wondering if one of the excerpt plug-ins would work as something like rss_auto_excerpt can generate it’s own link but I believe that the feed would simply be picking up the <txp:excerpt />
field which would, of course, be blank. Having said that I wonder if placing the plug-in tag directly into the excerpt textarea would work??? I am just thinking out loud here. I haven’t tried it at all.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Read more link in feed
Another way might be to simply give a visual indication that there is more to the article than is shown in the feed by using something like “……” at the end of each excerpt. That would be less work on your part.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Read more link in feed
That would be better but thats not a good solution for me. The “…” or “read more” link should be added automaticlly. The thing is, that my users might forget to add the “text stuff” at the end of every excerpt :(
Offline
Re: Read more link in feed
The only other way I can think of is to hack the “excerpt” function to append a “read more” link but I can’t advise you on that as my PHP knowledge isn’t good enough. Maybe someone else could pick that one up.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Read more link in feed
To line 121 in /textpattern/publish/atom.php (after $content = trim(replace_relative_urls(parse($thisarticle['body']), $permlink));
).
$content = $content.' <a href="'.$permlink.'">Read more...</a>';
$summary = $summary.' <a href="'.$permlink.'">Read more...</a>';
And the same to line 73 in /textpattern/publish/rss.php.
I hope that mod helps you.
Offline