12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Oct 13, 2021

[Condition] nth Post in Repeater (Loop Counter)

Sridhar Katakam

In this members-only tutorial we shall register a custom condition using which elements inside a Oxygen's Repeater Div can be set to be output only if the post is at the specified position.

Applying

for example to a Text component inside a Repeater will make it be output only for the third post (first being the latest).

This is similar to the previous [Condition] Every nth Post in Repeater (Loop Counter) article except that index of the post (plus 1, since indexing starts at 0) will be checked against the number input in the condition.

Step 1

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: [Condition] nth post for Repeater

Code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right