활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hi,
I need to loop according to given Integer input.
Eg - According to user input, i need to repeat to print some HTML elements.
if user input is 1,
<div> 1 <div>
if user input is 2
<div> 1 <div>
<div> 2 <div>
How can i achieve this from HTL.
Thanks
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
HTL does not support traditional looping, arithmetic operations.
you have to create a list from user input inside the sling Model as suggested by
Create an Integer List in the Sling Model based on the user input value. Fetch the list in HTL and loop over it.
You can use sly-list or sly-repeat base on requirement.
HTL does not support traditional looping, arithmetic operations.
you have to create a list from user input inside the sling Model as suggested by