Michelle Moshelian ha scritto:
I am new to Magnolia. Is there a way to automatically 'archive' news? I mean
- I want today's news stories on the homepage and yesterday's news
automatically on an archive page.
Yes.
Simple way: inside <cms:contentNodeIterator> look for date and display
only "today" news or "yesterday" news, comparing date field. No Java
required.
More complex, but more powerful: use the ParagraphRenderer paradigm and
preload news doing queries. Then you can store Collection<Content> (or
better, Collection<NewsBean>) on pageContext and then, using JSTL you
can iterate over news collection.
The same result is possible using FreeMarker (model + view).
In this way you can have news list wherever you want on your pages.
HTH,
Matteo
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------