<vte:else>

When used inside <vte:if> value of <vte:else> is evaluated and printed if <vte:if> test is not satisfied. When used inside <vte:foreach> value of <vte:else> is evaluated and printed if <vte:foreach> has nothing to loop trough.

Parent scope

<vte:foreach>

<vte:if>

Every <vte:else> tag must be direct descendant of <vte:if> or <vte:foreach> tag.

Example #1

<vte:if test="1 = 0">
    One is equal to zero.
    <vte:else>
        One is not equal to zero.
    </vte:else>
</vte:if>

Example #2

<vte:foreach from="{article_list}" item="article">
    <vte:value select="{article.get_title}">
    <vte:else>
        No articles.
    </vte:else>
</vte:foreach>
 
devdoc/vte/else.txt · Last modified: 2008/11/06 11:40 by milana
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki