ZenphotoCMS Forum
Ordering the NEWS - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Ordering the NEWS (/thread-6819.html)



Ordering the NEWS - sketchy - 2010-03-22

is there a way to order and re-order the NEWS as with the PAGES or Gallery?




Ordering the NEWS - kagutsuchi - 2010-03-22

As far as I know, there is no way to re-order news items as with pages or gallery items. News is sorted by the date on the back-end. How it is ordered on the front-end could be changed by the theme, however.




Ordering the NEWS - sketchy - 2010-03-22

really.. how would the theme be able to re-sort the NEWS? is there an example theme that i can look at that would best show this to learn from?




Ordering the NEWS - kagutsuchi - 2010-03-22

I don't know of any off-hand. What you would need to do depends on how you would want the news ordered. If you explain what you want, perhaps I can help set you on the right path.




Ordering the NEWS - sketchy - 2010-03-23

thanks.. it's pretty simple. i have some news categories that i like the 'newest 1st' way. but other categories i'll need to be 'edited last' or 'a-z'. i don't mind the NEWS page to be sorted to default, but when i create the links in my navigation to the New Categories like:
My Bookmarks (sorted A-Z)
My Projects (sorted last edited)

because my bookmarks are going to be placed in randomly when i put them up, but i always want them to display a-z.

and my projects will be getting updated as i do them, so i want the last edited one on top.

this are not PAGES, because i like them to display in the blog-style list that the NEWS section does so perfectly.

thanks for any help
cheers!




Ordering the NEWS - gjr - 2010-03-23

Had to chime in here just to highlight a probably seldom used awesome function: printSubPagesExcerpts

Check it out - was a lifesaver for me in a recent project. More or less, lets you set up a PAGE as a category heading.... for your situation, then you can reorder the subpages anyway you want(drag & drop).




Ordering the NEWS - acrylian - 2010-03-23

@sketchy: Well, there is a obvious concept difference between news (blog) and pages. However, the next_news() loop function has a parameter to change the sorting between "date" and "title" (= A-Z). And you can also change the direction between descending and ascending. Don't forget we have a documentation of all these functions!

The printSubpagesExcerpts() is of course also a way. And another is to use the object model framework to build your own custom stuff.




Ordering the NEWS - sketchy - 2010-03-23

thanks. i was hoping for the easy fix like Wordpress that i could just change the publish dates on the NEWS items and that would change the order. But i can deal with a bit of functions and loops if i need to. i'm just not a 100% developer and i learn as i go.. so i try to steer clear of that when i can.
cheers!




Ordering the NEWS - acrylian - 2010-03-23

Of course changing the date would change the order, too.




Ordering the NEWS - sketchy - 2010-03-24

ahhh.. yes.

i ended up using the pages-subpages trick and the date thing now.. brilliant.
cheers!