I’m wondering whether it’s possible to have an incremental variable through a CListView widget? For example I want the first item rendered to contain a param with the value 0, the second item to contain a param with the value 1, the third item to contain a param with the value 2… and so on…
Unfortunately I can’t use the item’s ID as a unique identifier, what I’m looking for needs to be an incremental value from the first item to the last.
I’m not sure if it’s possible to send a dynamic param through something like the viewData property, so that each item rendered has a unique value for a given param?
From what I can see the only unique data each rendered item in the list can have is the data model sent through the dataprovider property? Is this correct?
You can use
$indexvariable in theCListView.iteViewpartial. Take a look to the docs:$index: refers to the zero-based index of the data item currently being rendered.