We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    Hi guys,

    I am building a site which uses the Gallery plugin to allow website author to create galleries of photos.

    Is it possible in someway to create a Template Variable which outputs a list (single selection) of all Galleries which have been created? I basically want the user to be able to create a new resource and then pick the Gallery name to render on this resource - Currently they have to manually type in the Gallery name to do this, I'd like it to be automated so that they have a list menu of all available Gallery items which they can pick from.

    Is this possible?

    Cheers,

    dubbs.

    This question has been answered by Tyreal2012. See the first response.

    • discuss.answer
      • 30912
      • 463 Posts
      Simple, create a new TV, call it 'Selected Gallery', in the input options pick the input type of 'galleryalbumlist' and assign it to your template. Job done. smiley

      set up your call as the following:

      [[Gallery? &album=`[[*Selected Gallery]]`]]


      Hope that helps

        • 8168
        • 1,118 Posts
        Fab // thanks! I had not noticed the "galleryalbumlist" input option there... Cheers
          • 43141
          • 4 Posts
          Hi, I'm having a problem with my galleries which I think is caused by using the galleryalbumlist variable which I have named gallery-select. What is happening is that all galleries display the first image of the gallery with ID 1. This is the code I am using:

          [[!Gallery? &album=`[[*gallery-select]]` &toPlaceholder=`gallery`]]

          [[!GalleryItem? &id=`1`]]
          [[!+galitem.image:notempty=`
          <div class="image">
          <img class="[[+galitem.imgCls]]" src="[[+galitem.image]]" alt="[[+galitem.name]]" />
          </div>
          `]]
          <div style="display: block; position: relative; overflow: hidden; margin: auto;">
          [[!+gallery:notempty=`
          [[+gallery]]
          `]]
          </div>

          If I change the GalleryItem id to: &id=`2` then all the galleries show the second image (id 2) of the first gallery (id 1)