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).
->button previous news would see older news
->button next news would see the latest news
maybe, by adding a sort option in the function printNewsPageListWithNav
maybe, by adding a sort option in the admin tab...
thanks for your advice
Comments
but is it the function printNewsPageListWithNav use these sorting options ?
see http://vincent.bourganel.free.fr/zenphoto/index.php?p=news
news1 (oldest one) is on page 2 and news4 (newest one) is on page 1.
if we are with ascending order, we should have news4 on page 2 and news1 on first page : previous is too see older news.
actualy, i do a loop with
<?php while (next_news("date","desc")): ;?>
...
<?php endwhile; ?>
<?php printNewsPageListWithNav(" » "," « ",true); ?>
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 ?
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 ?
on the gallery.php page if you use the "news on index" option and one on the news.php page. Of course both need to be set to asc.
See Here: http://zenphoto.maltem.de/
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.
could you explain what the evolution is ? there's nothing in the documentation.
Look at the news.php page's single article display at the next/prev article function. You can just copy over as parameters what you set for the next_news().