![]() |
|
List subpages of specified parent - 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: List subpages of specified parent (/thread-5664.html) |
List subpages of specified parent - jackdaw - 13-08-2009 Is there a way to use printPageMenu() somehow like this?: Ik would like to have a pagemenu in my left column showing only the (sub)pages belonging to a certain gallery. Let's say I have a gallery about cars, then I would name my first page 'Cars', leave it empty, but asign a few subpages to this parent page. These subpages should show up in the leftside columns. The same for other galleries. List subpages of specified parent - acrylian - 14-08-2009 So are you talking about pages or albums? These are different items. It is possible to show the sub items of the current item you are currently in using the "list-sub" option that both the printAlbumMenu() and the printPageMenu() feature. For pages there is also a function named If you need that sub item list static independend from the context or anything else you need to build your own function using the class methods. List subpages of specified parent - jackdaw - 14-08-2009 Well, I was talking about both pages and albums.
List subpages of specified parent - acrylian - 14-08-2009 So this menu should be a mixed one with album and page links, right? Then you would have to code your own functions using the class methods. Probably the custom field of albums may help to display what when as also might the codeblocks of pages. List subpages of specified parent - jackdaw - 14-08-2009 Just to show you what I had in mind: zenphoto. As you can see on the left, there are three subitems for 'Fotografie'. And 'Fotografie' is actually my first main album in the gallery which contains a lot of subalbums. For now I made three ZenPage-pages. In the future I want to make another main ZenPhoto-album 'Drawings' which also contains a lot of subalbums and then a want a few other ZenPage-pages to show up in the left column. Perhaps there is a way to do this, but then there should be an extra option available for the printPageMenu(), something like printPageMenu('parentID=1') which will show only the subpages of a specified parentpage. List subpages of specified parent - acrylian - 14-08-2009 It is already possible with a two extra code lines by setting up the current page object: List subpages of specified parent - jackdaw - 14-08-2009 Well, thanks! That works for all toplevelpages. But when I put those pages inside another page (so they become subpages of a parent), then it doesn't work anymore. List subpages of specified parent - acrylian - 15-08-2009 I am sorry, the right option is actually "omit-top". This prints the sub pages to a toplevel page if you are on the toplevel page or one of the sub pages. If the sub pages have subpages themselves it would foldout to them if their parent is selected. To get the sub page display if your are not on the parent page use it like this: List subpages of specified parent - jackdaw - 18-08-2009 I couldn't get the above to work like the way I wanted it, so I tried this:
One problem I encountered... The list of links in the sidebar keeps mentioning one page which I'm sure I set to 'unpublished', and this link works. But I don't want it to show up. EDIT... Sorry, the pagelink was indeed removed, but I could only see it after I logged out... List subpages of specified parent - dendraya - 12-10-2009 hi guys, i have a similar problem creating a navigation. i need to have to seperate navigations (one for the top level pages and one for the sub pages.) top-page1 right now i use List subpages of specified parent - acrylian - 12-10-2009 The printPageMenu has also a option to show only subpages if available ("list-sub"). What three pages? If you use Zenpage as intended you have only one theme file for pages, I see the issue with the active class of the main menu. The function does indeed not "know" that you are using it as a separate top level function. Have to look if that is doable if set to toplevel display. Meanwhile you will have to build your own function using List subpages of specified parent - dendraya - 12-10-2009 thx for the answer List subpages of specified parent - acrylian - 12-10-2009 Yes, by using "getParentPages()" |