Member
Member
tunafish   2011-11-17, 19:00
#1

Is there any way to loop through the ZenPage Pages?

I would like to print a list of Pages with title, date and content with 'read more' links when visiting the directory /zenphoto/pages/
Like when you do a search for a Page title.

I have found the next_page function but it seems only for search purposes.
In my theme's pages.php

// if there is no content it means we are looking at a blank pages.php if (!getPageContent()) { while (next_page()) : ; endwhile; }

Member
Member
sbillard   2011-11-17, 20:31
#2

You will have to use the object model for this. The zenpage class has a method getPages() to return the database rows for all the pages. You would have to instantiate a page object for each within your loop.

Member
Member
tunafish   2011-11-18, 00:18
#3

getPages()
Okay, that was very helpful!
Cheers :-)

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.