We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19975
    • 429 Posts
    I am looking to add an additional <div> every 1st and </div> 3rd row using the following code.

    [[!getResources? 
    	&parents=`0`
    	&tpl=`fCarouselRowTpl` 
    	&tpl_n1=`fCarouselRowTpl1`
    	&tpl_n3=`fCarouselRowTpl3`
    	&includeTVs=`1` 
    	&processTVs=`1` 
    	&tvPrefix=`` 
    	&showHidden=`1`
    	&tvFilters=`featureIndex==Feature`
    ]]
    


    The above code only returns the &tpl value rather than using &tpl_nN perimeters.

    Am I doing something wrong?

    Using the latest version of both MODX and getResources.
      Martin Sanders - Design & Web Development
      • 19975
      • 429 Posts
      The completed working code:

      					[[!getResources? 
      						&parents=`0`
      						&tpl=`fCarouselRowTpl` 
      						&tplFirst=`fCarouselRowTpl1st`
      						&tpl_n3=`fCarouselRowTpl3`
      						&tpl_n4=`fCarouselRowTpl1`
      						&tplLast=`fCarouselRowTpl3`
      						&includeTVs=`1` 
      						&processTVs=`1` 
      						&tvPrefix=`` 
      						&showHidden=`1`
      						&tvFilters=`featureIndex==Feature`
      					]]


      &tpl= Default row
      &tplFirst= First row with opening <div>
      &tpl_n3= Third row item with closing </div>
      &tpl_n4= Open new grouped row <div>
      &tplLast = Last row with closing </div>

      This may help someone wink

        Martin Sanders - Design & Web Development