zenphoto forums » Themes

How do I know that currently a zenpage is displayed?

(6 posts)

Tags:

  1. rreimche

    Member
    Joined: Apr '12
    Posts: 18

    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?

    Posted 1 year ago #
  2. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,766

    here is $_zp_gallery_page which is set to the script that is being run, e.g. album.php, pages.php, etc.

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  3. rreimche

    Member
    Joined: Apr '12
    Posts: 18

    But if I need to display smthng on pages but not on albums?

    Posted 1 year ago #
  4. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,766

    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.

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  5. Zenphoto support team
    fretzl

    Moderator
    Joined: Sep '08
    Posts: 528

    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.

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  6. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,341

    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).

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.