New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • I'm not sure I know what you're asking? I'm afraid I'm a bit slow this morning. When you say "ordinal number" would that be a number you have given the photo, or something in the metadata?

    Quote from: misterio at Mar 06, 2018, 04:44 PM
    Hello! I need to get ordinal number of the picture in placeholder.
    Analog of placeholder [[+idx]] in Gallery snippet.

    Any ideas?
    Thanks in advance!
    • Quote from: jerry325 at Mar 06, 2018, 05:46 PM
      I'm not sure I know what you're asking? I'm afraid I'm a bit slow this morning. When you say "ordinal number" would that be a number you have given the photo, or something in the metadata?

      Quote from: misterio at Mar 06, 2018, 04:44 PM
      Hello! I need to get ordinal number of the picture in placeholder.
      Analog of placeholder [[+idx]] in Gallery snippet.

      Any ideas?
      Thanks in advance!

      the index of each image item
      • Where is that info available? Is it in the exif? or is it somewhere else?

        Quote from: misterio at Mar 06, 2018, 05:56 PM
        Quote from: jerry325 at Mar 06, 2018, 05:46 PM
        I'm not sure I know what you're asking? I'm afraid I'm a bit slow this morning. When you say "ordinal number" would that be a number you have given the photo, or something in the metadata?

        Quote from: misterio at Mar 06, 2018, 04:44 PM
        Hello! I need to get ordinal number of the picture in placeholder.
        Analog of placeholder [[+idx]] in Gallery snippet.

        Any ideas?
        Thanks in advance!

        the index of each image item
        • If you could explain to me what you are trying to do, or what you want the finished page to look like I might be of more help. Like I said, I am a little slow at times smiley
          • Sorry for my english.
            Now I have a working gallery that works with the Gallery snippet - https://mirperchatok.ru/catal/perchatki-iz-ispanii.
            The source code of this gallery:
            <div class="content-conveyor" id="lightgallery"> 
                <div class="item">
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg.jpg" /></a>
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                </div>
                <div class="item">
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                </div>
                <div class="item">
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                	...
                	<a href="image.jpg" rel="lightbox-group1"><img src="image.jpg" /></a>
                </div>
            	...
            </div>
            


            Snippet call:
            <div class="content-conveyor" style="width: 100%;" id="lightgallery"> 
                <div class="item">[[Gallery? &album=`1` &sort=`rank` &dir=`ASC` &thumbTpl=`galItemThumb2`]]</div>
            </div>
            


            Chank galItemThumb2:
            <a href="[[+image_absolute:pthumb=`q=100`]]" rel="lightbox-group1"><img src="[[+image_absolute:pthumb=`w=150&h=150&zc=C`]]" /></a>
            [[+idx:mod=`5`:eq=`4`:then=`</div><div class="item">`]]
            


            If there are a lot of images in the gallery, it becomes inconvenient to sort images. getImages is very good for this.
            How to do this in chunk of snippet getImages:
            [[+idx:mod=`5`:eq=`4`:then=`</div><div class="item">`]]
            

            ?
            • OK, That helps a little. I am not at all familiar with Gallery though, I did look at it years ago and decided it did not meet my needs so I went on to make my own snippet and haven't looked back. Are you wanting to use the getImages snippet within the Gallery snippet on in place of it?
              • No. I want to move from the snippet Gallery to getImages. As I said above - pictures in a folder are easier to sort if there are a lot of them, as in my case.

                The snippet Gallery I describe as an implementation example.

                I configured getImages, it works fast. but I need to insert code "</div><div class="item">" after every 5 pictures.
                • Got it! You could achieve this by adding another loop at line 113 with a count to 5 and a template chunk with your <dev>s. Place that into a placeholder to call on your page.

                  Quote from: misterio at Mar 07, 2018, 05:30 PM
                  No. I want to move from the snippet Gallery to getImages. As I said above - pictures in a folder are easier to sort if there are a lot of them, as in my case.

                  The snippet Gallery I describe as an implementation example.

                  I configured getImages, it works fast. but I need to insert code "<div class="item">" after every 5 pictures.</div>