Found out this was down to an incomprehensible mistake in the core
rss_template.pt, which only needed a simple bit of revision.
[diff]
12 12 <metal:block
13 13 define-macro="master"
14 14 tal:define="
15 15 syn context/portal_syndication;
16 16 max max_items|python:syn.getMaxItems(here);
17 objects python: objectList[:max]"
17 objects python: objectList[-max:]"
17 17 >
[/diff]
Find it hard to understand how Plone could ship with this feature set to
display first items by default, also bizarre I couldn't find this
addressed on this list or anywhere else on the net.
Am I missing something, or is this a solution to the problem?
Regards,
Barney
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
I'm not sure but I believe the responsibility for providing the
correct order lies with the container object. The RSS feed is just
supposed to provide the top items returned by either
obj.synContentValues() or obj.getFolderContents(). I'm guessing that
if your news folder is sorted correctly, the stock rss_template
should give you exactly what you want.
Ric
This probably explains why no-one seems to have cried for help on this
before, and it was my original thought.
But if you modify the feed compilation at the highest order, then you
can attach feeds to any part of your site, without having to
specifically configure folders to list their contents in reverse order...
This method makes a lot more sense to me (why would you want to have
your RSS set to load the /oldest/ first by default?), but I guess there
may be other values to configuring your news folder properly.
Regards,
Barney
I don't believe I said oldest first. Just in whatever order is
defined for the object. In my experience, newest first is fairly
standard for RSS feeds -- both for the HTML display and the RSS feed.
RSS feeds were pretty much adopted first by the blogging community
where this is the typical order.
In any case, I don't think we want to hard code the order into the
template. There needs to be some way to configure it for different
use-cases. That means putting the sort control onto the container
object not the generic RSS template.
It might be an interesting enhancement to the stock Plone Folder
object to have a switch to sort the display in reverse chronological
order (of the creation date?). But you can get this now with a Smart
Folder. In your example, the news folder is just a Smart Folder
displaying news entries in reverse chronological order -- the RSS
feed for this folder should spit out the same order.
I believe most RSS feeds usually just mirror the content order of the
source page. But the syndication tool checks first for a
synContentValues method before the regular getFolderContents method.
So if you want a special object which you would like to display in
one order (via getFolderContents) but create an RSS feed in a
different order (via synContentValues), you have that flexibility --
although to get this effect, you might need to subclass your own
folderish or topic content type.
Ric