append-block

Summary

Similar to set-block but will create an array out of all appends instead.

Usage

{append-block [name=value1] scope=[global|root|relative] variable=value2}
  ...tpl code
{/append-block}

Parameters

NameTypeDescriptionRequired
name string Name of namespace no
scope scope of name no
variable string name of variable to return yes

Returns

Append the rendered output of the block as a new element in the named array

Description

Similar to set-block but will create an array out of all appends instead of overriting old values

Examples

example
In this example we will create an array named text, in the namespace MyNameSpace. This array will include two elements

{append-block name=MyNameSpace scope=root variable=text}

Initial variable content

{/append-block}

 

{append-block name=MyNameSpace scope=root variable=text}

some more content

{/append-block}

 

output:<br/>

{section var=element loop=$MyNameSpace:text}

 {$element}<br/>

{/section}

The output of the previous example is:

output:

Initial variable content

some more content

Comments

Log in or create a user account to comment.

Contents

Reference

Database diagram
Template operators
Template functions
    GUI
    Miscellaneous
    Program flow
    Variables
       append-block
       default
       let
       sequence
       set
       set-block
Data fetching
Modules
XML tags


Created

06/02/2004
2:24:17 pm
by Balazs Halasy

Last updated

18/02/2004
2:37:56 pm
by Vidar Langseid

Authors

Balazs Halasy
Vidar Langseid



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.