How to do multiple section in a template with one array with multiple arrays inside?

How to do multiple section in a template with one array with multiple arrays inside?

Saturday 31 July 2004 7:03:39 am - 1 reply

Author Message

Bård Farstad

Tuesday 10 August 2004 2:46:33 am

You can use section to do this. Here is a small example.

{let double_array=array( hash( 'name', 'First Glossary', 'values', array( 'Word1', 'Word2', 'Word3' ) ),
                         hash( 'name', 'Second Glossary', 'values', array( 'Word1', 'Word2', 'Word3' ) ) )}
{section var=single_array loop=$double_array}
    {$single_array.name}:
    {section var=value loop=$single_array.values}
        {$value}
        {delimiter},{/delimiter}
    {/section}
    {delimiter}<br/>{/delimiter}
{/section}
{/let}

--bård

Documentation: http://ez.no/doc

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.