ZenphotoCMS Forum
Check for presence of /page/ or gallery/album - 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: Check for presence of /page/ or gallery/album (/thread-8203.html)



Check for presence of /page/ or gallery/album - jackdaw - 2011-02-04

I want to style two links within my ZP installation just like the ones in WP. To do that I have to check for either the presence of a custom page I made for showing the lastest additions of images (/page/latest.php), or the presence of a regular gallery/album/image page.

You can see what I mean when you take a look at the sidebar:
http://www.spoenk.nl/beeldend/page/latest

In the main menu only the 'nieuwste foto's' and 'portfolio' links belong to ZP. The only thing I need to find out on which of the two kind of pages I am. I tried all kinds of functions, but somehow I did not succeed yet. Any idea's?




Check for presence of /page/ or gallery/album - acrylian - 2011-02-04

For custom pages you can use the $_zp_gallery_page global (stores "latest.php" in this case if you are on it). For "regular" items use the object model and check for the current item.




Check for presence of /page/ or gallery/album - jackdaw - 2011-02-04

Great!