CMS Development

kyKaq
Mitglied

Problem with repeater unique id

lösung

I use the html id {{ name }}. However, it returns to the same unique id.

I want to do repeater in repeater. Then the second repeater (inner one) can set the setting such as width and height of the item. The setting can enable me to do somethings like item in first repeater is smaller but the item in second repeater is larger.

PS: I had enable the repeater option of row and Repeater.

kyKaq_1-1605666655262.pngkyKaq_2-1605666717010.pngkyKaq_3-1605666755246.png

 

0 Upvotes
1 Akzeptierte Lösung
piersg
Lösung
Autorität

Problem with repeater unique id

lösung

{{name}} is a default value in HubL that returns the module instance id, as you can see. You could use module-{{loop.index}} which will give you "module-1" "module-2" and so on, for as many iterations as you add.

Lösung in ursprünglichem Beitrag anzeigen

2 Antworten
kyKaq
Mitglied

Problem with repeater unique id

lösung

It solves the problem, thanks for your solution

 

0 Upvotes
piersg
Lösung
Autorität

Problem with repeater unique id

lösung

{{name}} is a default value in HubL that returns the module instance id, as you can see. You could use module-{{loop.index}} which will give you "module-1" "module-2" and so on, for as many iterations as you add.