Page 1 of 1

RSS - subject and just a few words

Posted: Sun Jan 15, 2006 5:01 am
by CharlesP
Is there some way to configure RSS to include only the subject and n number of words from the blog?

Re: RSS - subject and just a few words

Posted: Sun Jan 15, 2006 7:39 pm
by garvinhicking
The RSS feed usually includes the whole "Body" part of your blog posting. So you could move everything else into the "Extended" section of your entries if you don't want the body to show in your RSS feed.

You could then edit the "entries.tpl" template if you want to show your "Extended" Body in the usual Blog all the time.

A second way is to use Serendipity 1.0 snapshots, where you can use Smarty templating for all RSS feeds. There you can use a code like "{$entry.body|truncate:0:255}" for showing the entry!

Regards,
Garvin

Posted: Sat Apr 29, 2006 9:45 pm
by Olger
...or publish your feed through Feedburner, thats what i did after getting very confused on this forum at first ;) http://www.feedburner.com. Just offer the feed though an html nugget. (you can than keep an eye on the amount of subscribers as well). Works for me.

Posted: Sun May 07, 2006 4:04 pm
by Hokey
Hi Garvin!

Could you tell me how to realize this Smarty-solution?

Posted: Sun May 07, 2006 4:40 pm
by garvinhicking
Hi hokey!

Sure. Edit your feed*.tpl template file. Replace "{$entry.body}" with "{$entry.body|truncate:255:'...'}". Save the template file. You're finished, and now will only see the first 255 characters of your entry body in the RSS feed(s).

Regards,
Garvin

Posted: Sun May 07, 2006 4:44 pm
by Hokey
Thank you Garvin! :D