![]() |
|
How do I know that currently a zenpage is displayed? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Themes (https://forum.zenphoto.org/forum-5.html) +--- Thread: How do I know that currently a zenpage is displayed? (/thread-9858.html) |
How do I know that currently a zenpage is displayed? - rreimche - 2012-04-15 I want to use isset() in if() to display something if a zenpage is displayed. Is there a variable, such as $_zp_current_album for a currently displayed ZenPage? Or should I use another way? How do I know that currently a zenpage is displayed? - sbillard - 2012-04-15 here is `$_zp_gallery_page` which is set to the script that is being run, e.g. `album.php`, `pages.php`, etc. How do I know that currently a zenpage is displayed? - rreimche - 2012-04-15 But if I need to display smthng on pages but not on albums? How do I know that currently a zenpage is displayed? - sbillard - 2012-04-15 Sorry, what is your question. I did answer how you know what script is running. That should be enough for you to make your `if` test. How do I know that currently a zenpage is displayed? - fretzl - 2012-04-16 You can find all Zenpage related functions here: `zp-core -> extensions -> zenpage -> zenpage-template-functions.php`. I guess you're looking for the function `is_Pages()` which checks if the current page is a zenpage page. How do I know that currently a zenpage is displayed? - acrylian - 2012-04-16 Also Zenpage pages have their own theme file `pages.php` where you would have to place the checks you need. There is of course also a equivalent to `$_zp_current_album` which is `$_zp_current_zenpage_page`. (all listed on the user guide global variable article). |