• News
  • Developer information
  • Projects & contributions
  • Forum
  • Issue tracker
  • Open Funding
  • Security
  • User groups
  • Support
  • Store
  • Company

  • Path

    ez.no / exponential / documentation / development / libraries / ez template / functions / sequence


    Sequence

    These documentation pages are no longer maintained. Please visit the new documentation site.

    The sequence function allows for creating a sequence which is iterated over and wrapped around when the end is reached. This is particularly useful when you want to alternate colors in a list. It's possible to create 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

    Comments

    Contents

    Development

    Extensions
    Exponential datamodel
    Exponential tuning and stability
    Importing attribute data
    Kernel
    Libraries
        eZ xml
        eZ db
        eZ i18n
        eZ soap
        eZ template
           Basics
           Functions
              Function list
              Section
              Sequence
              Delimiter
              Switch
              Include
           Operators
        eZ webdav
    Scripting
    Standards
    System overview
    Test Suite
    Using Doxygen to create API documenta...


    Created

    07/07/2003
    3:17:03 pm
    by Bård Farstad

    Last updated

    12/07/2003
    1:39:33 pm
    by Björn Dieding@xrow.de

    Authors

    Bård Farstad
    Björn Dieding@xrow.de



    This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.