The sequence function allows for creating a sequence which is iteratedover and wrapped around when the end is reached. This is particularlyuseful when you want to alternate colors in a list. It's possible tocreate multiple sequences and advance them individually.

 

代码
{sequence name=Seq loop=array(a,b,c)}

<table>
<tr><th>Sequence value</th><th>Section item</th></tr>

{section name
=Loop1 loop=array(1,2,3,4,5,6)}
<tr><td>{$Seq:item}</td><td>{$Loop1:item}</td></tr>
{
* Next sequence *}
{sequence name
=Seq}
{
/section}
</table>
The above example will return this result (the sequence a, b, c is repeated):

Sequence value Section item

a 1

b 2

c 3

a 4

b 5

c 6

 

相关文章:

  • 2021-09-30
  • 2021-12-14
  • 2021-05-30
  • 2022-03-05
  • 2021-06-09
  • 2021-11-28
  • 2021-09-24
  • 2022-02-09
猜你喜欢
  • 2021-10-25
  • 2021-12-12
  • 2021-06-29
  • 2021-10-02
  • 2022-12-23
  • 2022-03-08
  • 2022-01-03
相关资源
相似解决方案