We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35103
    • 54 Posts
    Hello all,

    I am building a portfolio site for a photographer. His work is broken into categories. I want to list the categories down the side menu and when you click a category load a large image from the album associated with that category. I want "previous / next" navigation to click to view other images in the album. I don't want any thumbnails visible while viewing a large image.

    The Gallery plugin seems to offer all the tools for this using GalleryItem and GalleryItemPagination and maybe even GalleryAlbums. However I can't seem to get this all working together. Below is some code, which nearly works, but the navigation doesn't function properly if you try and target another album or image id from another album:
    <html>
    <head>
    <title>[[++site_name]] - [[*pagetitle]]</title>
    <base href="[[++site_url]]" />
    </head>
    <body>
    <div>
    [[*content]]
    </div>
    
    <div style="clear:both;">
    [[!GalleryItem? &id=`1` ]]
    
    [[!+galitem.image:notempty=`
    <div>
      <br />Albums: [[+galitem.albums]]
      <br />Name: [[+galitem.name]]
      <br />Tags: [[+galitem.tags]]
    </div>
    <div class="image">
      <a href="[[+galitem.image]]">
        <img src="[[+galitem.image]]" alt="[[+galitem.name]]" />
      </a>
      
    </div>
    `]]
    </div>
    
    <div>
    [[!GalleryItemPagination? &album=`1`]]
    [[!If? &subject=`[[!+galitem.prev.id]]`&operator=`isnotempty` &then=`
    <a id="previmg" href="[[++site_url]]?id=[[*id]]&galItem=[[!+galitem.prev.id]]&galAlbum=1&galTag=">previous</a>`]]
     
    [[!If? &subject=`[[!+galitem.next.id]]`&operator=`isnotempty` &then=` / `]]
     
    [[!If? &subject=`[[!+galitem.next.id]]`&operator=`isnotempty` &then=`
    <a id="nextimg" href="[[++site_url]]?id=[[*id]]&galItem=[[!+galitem.next.id]]&galAlbum=1&galTag=">next</a>`]]
    
    </div>
    </body>
    </html>
    


    Is this the correct technique / approach? It seems like it should be a simple gallery to make!

    Would massively appreciate any help with this!

    Thanks in advance,

    David