![]() |
|
Navigation not working correctly? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html) +--- Thread: Navigation not working correctly? (/thread-10274.html) |
Navigation not working correctly? - dagloos - 06-08-2012 If I understood correctly the albums and news pages use the same pagination and I'm including the same header on every page. So I'm using the same code as I am using for albums, but it doesn't seem to work properly. On my blog page I have the code for the news navigation in the middle, which works perfectly, but when you go to page 2 it shows (let's call it) the album navigation (on the left) only to go to the previous page and not for the next page. Also when you click the album navigation my blog suddenly has 10 pages and you click through every single news article instead of the ones I placed in the category 'blog'. How could I merge these two navigation to one and make it work correctly? The link: The code for the news navigation: The code for the album navigation: Navigation not working correctly? - acrylian - 06-08-2012 No, you understood wrong and probably did not look at the functions documentation. Although they work similar the album loop and news loop use different functions for the pagination. You need to escape code examples properly so I cannot see what you do there. Anway Navigation not working correctly? - dagloos - 06-08-2012 I keep looking and searching (forum, website, google). I only end up posting here when I just don't know what to do anymore, 'cause I already feel bad enough for not being able to figure out everything myself. I am learning as I go, when it comes down to PHP. Thanks for giving me the right code. I did find these in the documentation, but I just wanted to figure how to display these when there actually is a prev/next page. Thinking the album/news use the same pagination. I'm gonna try to figure out the rest now. Navigation not working correctly? - acrylian - 06-08-2012 No problem. For the future you find the functions documentation via this: There are also quick links to general and zenpage template functions (A few are noted on the theming tutorial as well). Navigation not working correctly? - dagloos - 07-08-2012 I got the navigation running Now the only thing that bothers me, and I can't figure out why, is that even if there is no next page the link shows, the previous page link works correctly. This is the code I'm using:
Navigation not working correctly? - Mark R - 08-08-2012 Seems you are close. This is the code I am using for pagination of my articles. ` ` I see what you mean. You are ending up with a link to the same page you are on for your NEXT when at the end of the list. Navigation not working correctly? - acrylian - 08-08-2012 I see it on the site as well. Did you try a standard theme? I cannot reproduce that even on our own site. Last page of the user guide category: Navigation not working correctly? - dagloos - 08-08-2012 I grabbed the code from the zpMobile theme. I tested the navigation with that theme and it works as it should, but what I did was grab the code when the zpMobile theme displays one news article and adapted it to my needs. I used the Navigation not working correctly? - acrylian - 08-08-2012 [i]but what I did was grab the code when the zpMobile theme displays one news article[/i] |