We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38798
    • 1 Posts
    Hello all, I'm new with ModX and I installed Gallery and searched on the web how I can set the name under each thumbnail but I failed... I never found any post on this forum about this so can anyone help me?

    Thank you!
      • 38713
      • 91 Posts
      Hi if this is for a particular gallery using the
      [[!Gallery]]
      snippet you need to create your own custom chunk to replace galItemThumb which is the default and then call it in the snippet call with
      &thumbTemplate=`nameOfReplacementChunk`


      You will need to add this tag underneath the thumb in that chunk: [[+name]]

      Here is an example:

      <li class="[[+cls]]">
          <a href="[[+linkToImage:if=`[[+linkToImage]]`:is=`1`:then=`[[+image_absolute]]`:else=`[[~[[*id]]?
                  &[[+imageGetParam]]=`[[+filename]]`]]`]]">
      
              <img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" />
          </a>
          <h3>[[+.name]]</h3> <!-- This bit here -->
      </li>


      If it were for the
      [[!GalleryAlbums]]
      you would do very much the same.

        Twitter @alexmercenary
        • 23299
        • 1,161 Posts
        Have you tried the default title and description fields when uploading your galley images?
          • 36624
          • 535 Posts
          Hello, i m using fancybox on my page and i would like to output the TAG in my chunk

             <a href="[[+image_absolute:phpthumbof=`w=1024&h=768&zc=1&aoe=0&far=1`]]" title="[[+tag]] " class="fancybox" rel="gallery[[+album]]" >
          
                  <img class="[[+imgCls]]" src="[[+image_absolute:phpthumbof=`w=50&h=50&zc=1`]]"  alt="" height="50" width="50"/>
          
              </a>


          the tag should be in the title attribute but i can't output anything.

          just to test i have tried :
          [[+name]] = doesnt work !
          [[+.name]] = doesnt work !
          [[+.tag]] = doesnt work !
          [[+tag]] = doesnt work !
          [[+gallery.tag]] = doesnt work ! (i know this is wrong..)
          [[+galitem.tag]] = doesnt work !


          any advice ? [ed. note: emmanuel last edited this post 14 years, 5 months ago.]
            CTRL+SHIFT+U - Clear Cache
            CTRL+SHIFT+H - Hiding Heft Panel
            CTRL+SHIFT+N - Fast Create Resource
            CTRL+ALT+P - Preview Recource (in edit resorce window)
            CTRL+ALT+S - Save
            • 38713
            • 91 Posts
            Can i see you snippet tag?

            try
             [[+galitem.tags]]


              Twitter @alexmercenary
              • 36624
              • 535 Posts
              here we are :

              in my template i have

              [[getResources?
              	&resources=`14`
              	&parents=`-1`
              	&tpl=`creationTpl`
              	&includeTVs=`1`
              	&processTVs=`1`
              	&tvPrefix=``
              	&processTVList=`creation.photos`
              	&includeTVList=`creation.photos`
              	]]
              


              chunk creationTpl :

              [[+creation.photos:isnotempty=`
              		
              <div class="slideshow">
              				<div class="slides pics">
              					[[Gallery? &album=`[[+creation.photos]]` &thumbTpl=`creaThumb` &thumbWidth=`50` &thumbHeight=`50` &useCss=`0`]]
              				</div> 
              </div>
              `]]
              



              chunk creathumb :

              <div class="gal-item">
                  <a href="[[+image_absolute:phpthumbof=`&w=1024`]]" title="[[+galitem.tags]]" class="fancybox" rel="gallery[[+album]]" >
              
                      <img class="[[+imgCls]]" src="[[+image_absolute:phpthumbof=`w=50&h=50&zc=1`]]"  alt="" height="50" width="50"/>
              
                  </a>
              </div>
              


              all is ok, except [-[+galitem.tags] output nothing.. [ed. note: emmanuel last edited this post 14 years, 5 months ago.]
                CTRL+SHIFT+U - Clear Cache
                CTRL+SHIFT+H - Hiding Heft Panel
                CTRL+SHIFT+N - Fast Create Resource
                CTRL+ALT+P - Preview Recource (in edit resorce window)
                CTRL+ALT+S - Save