We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40469
    • 33 Posts
    Hi guys,
    I've been using Evo for 5 years and I'm giving a 1st try to Revo this week.
    'Gallery' looks interesting, but I didn't get everything yet. Could someone please help me and tell me how to give the first item of a gallery a different template?

    Here's what I did for now :
    [[!Gallery? &album=`[[*alias]]` &toPlaceholder=`gallery`]]
    
    <ul id="auto-loop" class="gallery">
        [[+gallery]]
    </ul>


    Each item is using the chunk 'galItemThumb' to be displayed - and that's OK, except for the first one because I would like it to use another chunk.

    I certainly missed something obvious in the doc, but I couldn't find it - sorry about that.
    Thanks in advance for helping smiley

    This question has been answered by sriananda. See the first response.

    • discuss.answer
      • 47717
      • 144 Posts
      Quote from: youfff at Jun 30, 2015, 09:12 AM


      Each item is using the chunk 'galItemThumb' to be displayed - and that's OK, except for the first one because I would like it to use another chunk.


      Hi,

      I managed to do this, thanks to MigX.
      I made a MigX TV, and made some images for this. Then I used a bootstrap gallery function.
      With MigX, you can simply define the first chunk.
      The advantage of this powerful system, is that the backend-user can simply define all his images on one page, with the other TV's. He doesn't have to go to a whole different area on the site, which can be confusing for some.

       [[!getImageList?
       &tvname=`galleryMigx`
      &tplFirst=`galItemThumb_first`
      &tpl=`galItemThumb`
      &docid=`[[*id]]`
      ]]
        • 40469
        • 33 Posts
        Hi sriananda,
        Thanks for the advice, I'm gonna give it a try!

        Edit : it works like a charm, thanks a lot smiley [ed. note: youfff last edited this post 8 years, 9 months ago.]
          • 37076
          • 12 Posts
          Hello youfff,
          you can use [[+idx]] in Gallery.thumbTpl template
          [[If? &subject=`[[+idx]]` &operator=`is` &operand=`0` &then=`[[$first_image]]` &else=`[[$default_image]]`]] [ed. note: wzavhpem last edited this post 7 years, 1 month ago.]