We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36786 ☆ A M B ☆
    • 209 Posts
    I have a MIGXtv setup for a gallery of ingredients with a nice image for each. My issue is that my records need to be output in groups of four, so each group of four is surrounded by a bootstrap "row" opening and closing tag. I suppose with getResources I would use the tpl_nN parameter, but that doesn't seem to be an option with getImageList. Does anyone know how I would achieve this? I would prefer not to have MIGX handle child resources and call getResources instead.
      Ben Morrison
      Hacking templates to pieces since 2003
      • 4172
      • 5,888 Posts
      getImageList has tpl_nN, tpl_first, tpl_last - properties and tpl_oneresult, if you have only one result and need to put both, the opening and closing - tag in it.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36786 ☆ A M B ☆
        • 209 Posts
        The tpl_last parameter breaks the snippet output, outputting a full array.
          Ben Morrison
          Hacking templates to pieces since 2003
          • 37042
          • 384 Posts
          Hi Ben. Glad you've brought this up. I didn't have that issue with MIGX but have had problems with getResources and the fact that everything need to be wrapped in a row class when working with Bootstrap.
          On a side note, it seems s if Foundation doesn't rely on a wrapper row. I might try that for a future MODX site and see how it fares.
            ...
            • 4172
            • 5,888 Posts
            sorry, its tplFirst, tplLast, tpl_nN

            I have:

            [[getImageList? 
              &tvname=`migx2` 
              &tplFirst=`migxrow_first` 
              &tplLast=`migxrow_last` 
              &tpl_n3=`migxrow_n`
              &tpl=`migxrow`
            ]]
            


            migxrow:
            <li>[[+name]]</li>


            migxrow_first:
            <ul>
            [[$migxrow]]
            


            migxrow_last:
            [[$migxrow]]
            </ul>
            


            migxrow_n:
            [[$migxrow]]
            </ul>
            <ul>
            
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!