Page 1 of 1
Single feed, multiple categories possible?
Posted: Fri Apr 11, 2008 6:25 pm
by Don Chambers
As the title suggests, I wanted to know if it is possible for s9y to provide a single feed containing the entries from more than a single category... is this possible?
Posted: Sat Apr 12, 2008 3:11 am
by Don Chambers
Also - can I pick up a specific feed format (ie atom, opml, rss1) for a specific category? Right now, a category feed seems to default to rss2.
Posted: Sat Apr 12, 2008 1:05 pm
by garvinhicking
Hi!
You should be able to get this via:
rss.php?serendipity[category]=A;B;C;D
replace those letters with the category IDs you want to combine.
And you can use
rss.php?version=2.0
rss.php?version=atom1.0
etc. to determine the format. I've documented all those variables for the german book, let's see if we can get an english translation soon
Note that those variables will not work when appended to "prettty URLs". You will need to use the rss.php URL for all of them to work.
Regards,
Garvin
Posted: Sat Apr 12, 2008 4:38 pm
by Don Chambers
Thanks Garvin - now how do I combine them on
www.example.com for categories 3 and 8 getting an atom 1 feed?
Posted: Sat Apr 12, 2008 5:09 pm
by garvinhicking
Hi!
rss.php?serendipity[categories]=3;8&version=atom1.0
Regards,
Garvin
Posted: Sat Apr 12, 2008 5:26 pm
by Don Chambers
garvinhicking wrote:Hi!
rss.php?serendipity[categories]=3;8&version=atom1.0
Regards,
Garvin
thanks Garvin - one small typo in your suggestion.. it should be [category], not [categories], just like your original response, and use & for xhtml compliance.
But thanks for the syntax!
This should work on sites with URL rewriting... I just need to use the php?, correct?
EDIT: the & bit does not work... I thought it would. Any idea why it does not?
Posted: Sat Apr 12, 2008 7:46 pm
by Don Chambers
Garvin - would it be possible for the syndication plugin's option to included extended body be modified to allow that decision on a feed by feed basis?
What I want to do is provide the extended body in only one of the feeds.... most likely, the rss1 feed since nearly any service, such as feedburner, google, etc, are most certainly looking at rss2.... that would allow me to use the the rss1 feed to get body + extended from one of my sites, and aggregate it to another one of my sites while still only showing most readers the entry body only on all other feed formats.
Also, what is the difference between:
{$entry.feed_body|@escape} and {$entry.body} and the difference between {$entry.feed_ext|@escape} {$entry.extended} (other than being escaped)???
Posted: Mon Apr 14, 2008 10:14 am
by garvinhicking
Hi!
& is only valid in HTML, not in URLs themselves.
Don Chambers wrote:Garvin - would it be possible for the syndication plugin's option to included extended body be modified to allow that decision on a feed by feed basis?
Yes, you can edit your .tpl template files and there include entry.extended where you want it. Then make sure the syndication plugin does not have the 'Include Extended Body' option checked, because that will operate on entry.feed_body which works for all feeds.
{$entry.feed_body|@escape} and {$entry.body} and the difference between {$entry.feed_ext|@escape} {$entry.extended} (other than being escaped)???
feed_body includes body+extended depending on what the user configured for the plugin, body only the body, feed_ext contains the "Continue reading" line, .extended the extended body.
@escape simply makes sure that a var can be used within XML.
Regards,
Garvin