NextGEN Gallery
[resolved] Get gallery url (6 posts)

  1. un_user
    Posted 3 years ago #

    Couple of days I'm trying to show the gallery url of a picture in lightbox. I find a code that catch the image url - <?php echo $image->imageURL ?> - and wonder is there a code that gets the gallery url (something like - $gallery->galleryURL)?

    Any help would be greatly appreciated. Thanks.


  2. Alex Rabe
    Posted 3 years ago #

    The gallery istelf didn't have any URL, it will be instert into a post / page or multiple pages / posts

  3. un_user
    Posted 3 years ago #

    But how to get the page url dynamic?. What I want to do is this:

    I have generated recent images on the frontpage. When a user clicked for example on image 1 and it pop-ups in lightbox I want there to show from wich gallery is the image and when the user clicked on that link to go to that gallery. Is there a way to do it?

    p.s. sorry for my english

  4. Alex Rabe
    Posted 3 years ago #

    Not that easy, but possible for coder

    1. If you know the gallery id you can use $gallery->pageid
    2. with get_permalink() you can get the page url where the gallery points to (in the case you selected it)

    If you didn't set the page in the gallery settings, there is no possibility to get this url without crawling all posts

  5. un_user
    Posted 3 years ago #

    OK. Thanks, I'll try it.

  6. un_user
    Posted 3 years ago #

    Alex, i changed $gallery->pageid to $image->pageid and it works like a charm!!!
    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.