![]() |
|
sort of news in reverse chronological order - 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: sort of news in reverse chronological order (/thread-6864.html) |
sort of news in reverse chronological order - vincent3569 - 2010-04-01 hello I use zenphoto with zenpage Is it possible to add a sorting of news in reverse chronological order? Indeed, the loop with news (with the navigation bar), the latest news is on page 1, the oldest is on page 4 (for example). I would like the latest news is on page 4 and the oldest is on page 1 (same example). maybe, by adding a sort option in the function printNewsPageListWithNav thanks for your advice sort of news in reverse chronological order - acrylian - 2010-04-02 It is quite standard that the latest news as it is the most important is upfront. However, it is already there: http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functionnext_news sort of news in reverse chronological order - vincent3569 - 2010-04-02 well, it's a good news ! but is it the function printNewsPageListWithNav use these sorting options ? see http://vincent.bourganel.free.fr/zenphoto/index.php?p=news if we are with ascending order, we should have news4 on page 2 and news1 on first page : previous is too see older news. sort of news in reverse chronological order - acrylian - 2010-04-02 Sure that you set the parameters correctly? printNewsPageListWithNav is dependent on the loop. sort of news in reverse chronological order - acrylian - 2010-04-02 I just tried, works as expected for me. Note you have to set both parameters. sort of news in reverse chronological order - vincent3569 - 2010-04-02 maybe there's something I do not understand. actualy, i do a loop with ... but navigation still not works as well and whatever sort order and sort direction, the display still the same could you explain how set those parameters and how correctly use them with printNewsPageListWithNav ? sort of news in reverse chronological order - acrylian - 2010-04-03 Well, you actually did it correctly except that you need of course to use "asc" (ascending) instead of "desc" (descending) to get the oldest to newest direction. The printNewsPagesListWithNav() does not require any special settings. sort of news in reverse chronological order - vincent3569 - 2010-04-05 "The printNewsPagesListWithNav() does not require any special settings. " i'm not agree with that : it's ok if you are with ascending sort but it's not logical if you are with descending sort. with this sort option, you should displayed the last page of news (and not the 1st one), and on navigation bar, previous page shown oldest news, next page shown newest. Similarly, if you are on single news article, previous and next links should show oldest single news or newest single news. what you think about it ? sort of news in reverse chronological order - acrylian - 2010-04-06 Sorry, I can't see any issue with the printNewsPagesListWithNav() function. If you tell the next_news() loop to be ascending that function is also mirroring that. If it does not it might be your theme. Note that for example the zenpage theme has two loops!: One It might be that "title" sorting does not work correctly if using the multilingual mode though. I have to look at that. I agree however that the prev/next links for hte single news should also be reversed (prev oldest / next newest). I will add options to those as well (I will not make this an backend option for the sake of flexibility as you can theoretically use loops on other pages as well). Update: Tonight's nightly will have the same parameters like the next_news() function. sort of news in reverse chronological order - tagecho - 2010-04-09 Thanks for solution. sort of news in reverse chronological order - vincent3569 - 2010-04-09 thanks for your help. could you explain what the evolution is ? there's nothing in the documentation. sort of news in reverse chronological order - acrylian - 2010-04-10 The documentation is of course only for the current official release not hte nightlies. The documentation is always in the files itself. |