Forum
Output perch item index in a block
Hi,
How do i output perch_item_index within a block?
i tried <perch:content id="perch_item_index" type="hidden" /> but that aaways outputs 1
so i tried <perch:block id="perch_item_index" type="hidden" /> but that breaks it
Any ideas?
perch_item_index
is in the scope of the parent item, so you'll need to bring those into scope and useparent.perch_item_index
to access it.so i did <perch:content id="parent.perch_item_index" type="hidden" /> but it now outputs nothing at all
So, i tried <perch:block id="parent.perch_item_index" type="hidden" /> but this breaks it
Ta
Did you add
scope-parent
on the blocks tag?ah perfect thanks