get current page url

bonjour
could you tell me how get the current page url (zenpage, news, album, image)?
I didn't found the function
merci

Comments

  • I've found: getRequestURI()
    it is what I searched
  • acrylian Administrator, Developer
    Actually I think it would be better to use the object model, unless you want to do something specific. There are global variables available for all five main items (album, image, Zenpage page, news article and news category) that contain the object of the current item if in context:
    `$_zp_current_image, $_zp_current_album, $_zp_current_zenpage_page, $_zp_current_zenpage_news, $_zp_current_category`
    On an single image page both the album and image one are available naturally.

    The object method `getLink()` will five you the url on all. Within functions you of course need to declare that global to be able to use it.

    There are more such globals: http://www.zenphoto.org/news/zenphotos-global-variables
Sign In or Register to comment.