Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Is there a tag where you can make a condition for the last item in the repeatable regions? I searched all over but could only find a tag for the last item in a paginated region.

Thanks.
We can use the two variables set by repeatable regions (k_count and k_total_records) to target specific rows within the repeatable regions. For example -
The following will show only the first row
Code: Select all
<cms:show_repeatable 'name_of_the region' >
    <cms:if k_count='1' >
        .. show contents of first row here ..
    </cms:if>
</cms:show_repeatable>

while the following will show only the last row
Code: Select all
<cms:show_repeatable 'name_of_the region' >
    <cms:if k_count == k_total_records>
        .. show contents of last row here ..
    </cms:if>
</cms:show_repeatable>

Hope this helps.
Great solution, thanks!
3 posts Page 1 of 1
cron