We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
perch_item_index resets on each pagination page - how to feature only 2 items.
Is there a way to stop perch_item_index being reset on each pagination page? What I am trying to do is the filter results by date but to featured the two latest articles in slightly different layout. See this template;
<perch:before> <div class="container // stories"> </perch:before> <perch:if id="perch_item_index" value="3" match="lt"> <!--* DO THE FEATURED BOXES *--> <perch:template path="content/stories/featured.html" /> <!--* BIT OF TRICK TO CHECK IF THE THIRD ITEM THEN TO DO THE CONTAINER *--> <perch:if id="perch_item_index" value="2" match="eq"> </div> <div class="container"> </perch:if> <perch:else /> <!--* NOW DO THE TEASER BOXES *--> <perch:template path="content/stories/teaser.html" /> </perch:if> <perch:after> </div> </perch:after> <perch:after> <perch:if exists="paging"> <div class="pagination pagination--news"> <perch:template path="pagination/default.html" rescope="parent" /> </div> </perch:if> </perch:after>
But what is happening is that the first two items on each new pagination page (page 2/3/4 etc) are being featured. I only want to feature the top 2 on the first page.
I did think about using perch_item_first but this wouldn't help me with the second item.
Want to reply to this thread?Login with Perch