We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9688
    • 37 Posts
    I’ve been tryng the snippet gallery, but I still have a problem.
    My website should be a kind of portfolio with the following pages :
    - All Works
    -- Work 1
    -- Work 2
    -- Work 3

    On my homepage I have created a chunk that bring up the images from an album called "Works". The problem is that all the works (works 1, works 2, etc.) displayed on the homepage show the same image.
    How can I do to make sure that the homepage show the first image of each work page ?

    This my actual code that show always the same image for every works :
                       [[!Gallery? &album=`Works` &limit=`1` &thumbWidth=`433` &thumbHeight=`289` &toPlaceholder=`photo`]]
                        <div class="grid_7">
                            [[+photo]]
                            <p>hello [[+pagetitle]]</p>
                        </div>
    
      • 9688
      • 37 Posts
      having no answer I will try to explain more clearly what I need for my portfolio website project.

      My goal is to create a online portfolio with all my different works. On each works, I have a list of images :
      - Portfolio
      -- Works 1 > Image 1, Image 2, Image 3, etc
      -- Works 2 > Image 1, Image 2, Image 3, etc
      -- Works 3 > Image 1, Image 2, Image 3, etc

      Then in the homepage, I need to display the list of different works with the first image of each works (see the first image uplaoded).
      Clicking on one of the work, I need to display all the images more or less like a blog.

      How can I do this ?
      I was thinking to create a TV for thumbnail and another for the big images. But it would be nice if the website can automatically resize the images.

      Should I install a kind of GD2 library ? Is that easy ?
      Should I use the Gallery snippet ? Then someone can please explain how to code it ! The documentation is really not helpful :-(

        • 36426
        • 197 Posts
        Hi this works to pull in the first image:

        http://forums.modx.com/thread/98144/snippet-not-working-right-all-the-time#dis-post-530695

        but I'm also replying to this post to try get some help to complete the snippet, as it could be really useful but seems to have a bug which means that gallery items with an ID over 100 won't show as the first image of an album... I hope someone can help with a fix.
          Yorkshire UK based hosting provider: https://www.simulant.uk