Game template for cycle

I am trying to create a for loop in a playback platform template, for example:

<ul> #{list items:1..${pageCount}, as:i} <li> <a href="#">${i}</a></li> #{/list} </ul> 

Be that as it may, it cannot work because of this: items: 1 .. $ {result.count}. I have a way to achieve the same:

Context: I implement pagination, and I need to create a link that leads the user to the specified page. Maybe there is a "game" or an achievement of the same.

+4
source share
1 answer

Just remove $ {} from the Count page:

 #{list items:1..pageCount, as:'i'} ${i} ${i.id} ${i.price} #{/list} 
+7
source

Source: https://habr.com/ru/post/1343288/


All Articles