Hi Anja
It depends what your understanding of "sort" is. Typically we sort
pages among the same "hierarchy", e.g. if you have a couple of child
pages below the same parent page, then you can "order" them. The
repository has a hierarchical structure, so we do not really have
something like a "sort".
However, what you see very often, is that you do a search (e.g. for a
date structure) and then sort the result set. This can by adding a
sort order to the search or by iterating through the resultset,
adding e.g. handle and date to a list object and then sort.
You though also want to consider the beauty of the hierarchical
structure. You mentioned earlier you have the date in the page title.
But you could also look into different scenarios. One I have used for
news archives: I create a page with the handle representing the year
(e.g. /dms/news/2006), there I have child pages for the months,
(e.g. /dms/news/2006/05). And all articles added have either a day/
time type of handle or a news-descriptive handle and a "issue date"
property. So when I add a new article, I have a small script creating
the correct path and storing the article. This way I can select a
date and easily find all articles for the year, year/month or even
year/month/day.
Another idea is not to use the page title for your date, but add a
new property (e.g. in the page porperties or a specific paragraph).
Your search would look for a date value within that property. This
way the title is "free" for a more informative usage.
hth
Giancarlo
On Aug 14, 2007, at 6:35 AM, Anja Maass wrote:
Hi,
I hope you can help
Ho can I sort my pages by a date?
For example I search after pages with the string "Mai" in the
title,now I want to display all hits sorted by date. Is there any
taglib already avialbale.
Thanks for any hint.
Anja
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------