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

    I’ve just installed MODx Revo-RC2 on a staging-server, and was delighted there was already a Gallery-package. The documentation for it however doesn’t seem to be quite complete, and I’m not quite sure how to modify the front-end output for it.

    My biggest question is: there’s the option of formatting the output through thumbTpl and containerTpl, but there’s no documentation on the placeholders I can use for it. I’d like to output something like:

    chunk: galleryContainerTpl
    <ul id="gallery">
    [[+thumbs]]
    </ul>
    


    chunk: galleryRowTpl
    <li><a href="[[+image]]" rel="gallery"><img src="[[+thumb]]" alt="[[+title]]" /></a></li>
    


    But I’ve no idea as to what the available placeholders are... Can anyone help me out?

    Thanks! laugh
      • 1778
      • 659 Posts
      Hello

      Have a look to the tplChunks provided with Gallery (you can find them in Elements->Chunks->Gallery.
      They are called "galItemThumb" and "galAlbumRowTpl’.
      This can give you an idea on how you can arrange them to make your own chunk displaying information as you want...

      For example if you want to display something like your "<ul id="gallery"> you should create a chunk based on "galItemThumb" with a code like this :

      <div class="gal-item [[+cls]]">
      <ul id=gallery">
          <li>
              <a href="[[+image]]">
                  <img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" />
              </a>
          </li>
      </ul>
      </div>
      


      Not sure if it works as it is but that’s the idea...

      And of course you can use your own css (just modify "use css=yes" to "use css=No" in the properties..

      Hope this helps
      Cheers
        • 28554
        • 201 Posts
        Quote from: anso at Jun 04, 2010, 05:59 AM

        Hello

        Have a look to the tplChunks provided with Gallery (you can find them in Elements->Chunks->Gallery.
        They are called "galItemThumb" and "galAlbumRowTpl’.
        This can give you an idea on how you can arrange them to make your own chunk displaying information as you want...

        For example if you want to display something like your "<ul id="gallery"> you should create a chunk based on "galItemThumb" with a code like this :

        <div class="gal-item [[+cls]]">
        <ul id=gallery">
            <li>
                <a href="[[+image]]">
                    <img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" />
                </a>
            </li>
        </ul>
        </div>
        


        Not sure if it works as it is but that’s the idea...

        And of course you can use your own css (just modify "use css=yes" to "use css=No" in the properties..

        Hope this helps
        Cheers

        Well it’s sort of helpful (hadn’t even seen the standard chunks yet), but the question still remains: in the containerTpl, how do I indicate where to place the rows. I’d expect something like this:

        Chunk: galleryContainerTpl
        <ul id="gallery">
        [[+thumbRow]]
        </ul>
        


        Catch my drift? That’s basically all I need to know @ this point and then I’m off laugh.
          • 28215
          • 4,149 Posts
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 28554
            • 201 Posts
            Quote from: splittingred at Jun 04, 2010, 12:42 PM

            http://svn.modxcms.com/docs/display/ADDON/Gallery.Gallery.containerTpl

            Should help. tongue

            You’re. Awesome.

            Thanks for the speedy response and help smiley. Is there someway to bypass the whole phpThumb part in the link to my image? It’s messing up my validation... If it’s a no-go I understand laugh

            Thanks again!
              • 28215
              • 4,149 Posts
              Hm, not at this time; seems I left that out. That would be a great feature request. You can file them here:

              http://github.com/splittingred/Gallery/issues

              Thanks Steven.
                shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                • 28554
                • 201 Posts
                Thanks for the tip smiley added 2 feature-requests to your github. Got it working live @ www.digitaaldier.nl/dev/youridentity (staging-server atm). Thanks again! (gosh I’m in a thankful mood laugh )