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

    Forgive what is, no doubt, a trivial coding question, but how do I add the [+maxigallery.counter+] placeholder to the thumbnails. I would like all thumbs to be automatically and sequentially numbered. I did the following:

    I changed this section in gallerypicturetpl to include the gallery counter placeholder.

    	[+maxigallery.picture.title:isnot=``:then=`
    		<p style="width: [+maxigallery.picture_width_thumb+]px;">
    		[+maxigallery.counter+][+maxigallery.picture.title:htmlent+]
    		</p>
    	`+]


    And added the following.

    	[+maxigallery.picture.title:is=``:then=`
    		<p style="width: [+maxigallery.picture_width_thumb+]px;">
    		[+maxigallery.counter+]
    		</p>
    	`+]


    I anticipated that I would be doing something against best practice, or plain wrong, but no matter what I try I cannot get the counter to show. I did clear the cache, and even tried adding some plain text to the template (in place of the placeholder) to test it, and the text did appear.

    What am I doing wrong?

    Thanks.
      • 37272
      • 216 Posts
      Oh, is it that I can only add certain placeholders to particular MaxiGallery templates? If so, is there some other way of achieving my goal?

      I’m using slimbox, by the way.

      Thanks.
        • 7923
        • 4,213 Posts
        Yes, you can see the available placeholders for each template here: http://wiki.modxcms.com/index.php/MaxiGallery#Placeholders

        If you download the test version for the next release, you can use following placeholders in gallerypicturetpl:

        [+maxigallery.rownumber+]
        [+maxigallery.picrownumber+]
        [+maxigallery.picpagenumber+]
        [+maxigallery.picnumber+]


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."