Marc - Sebastian Lucksch > Dotiac-0.8_1 > Dotiac::DTL::Tag::firstof

Download:
dotiac/Dotiac-0.8_1.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.8   Source  

NAME ^

Dotiac::DTL::Tag::firstof - The {% firstof VARIABLE1[|VARIABLE2[|VARIABLE3[|...]]] %} tag

SYNOPSIS ^

Template file:

        {% firstof var1 var2 "default text" %}

DESCRIPTION ^

Outputs the first true value from its argument list.

This is the same as:

        {% if var1 %}
                {{ var1 }}
        {% else %}
                {% if var2 %}
                        {{ var2 }}
                {% else %}
                        default text
                {% endif %}
        {% endif %}

BUGS AND DIFFERENCES TO DJANGO ^

If you find one, please report it.

SEE ALSO ^

http://www.djangoproject.com, Dotiac::DTL

LEGAL ^

Dotiac::DTL was built according to http://docs.djangoproject.com/en/dev/ref/templates/builtins/.

AUTHOR ^

Marc-Sebastian Lucksch

perl@marc-s.de

syntax highlighting: