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

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::widthratio - The {% widthratio CURRENTVALUE MAXVALUE CONSTANT %} tag

SYNOPSIS ^

Template file:

        <img src="bar.png" width="{% widthratio current max 160 %}">

DESCRIPTION ^

Calculates the ratio of CURRENTVALUE to MAXVALUE and applies this to a CONSTANT.

CURRENTVALUE and MAXVALUES are variables and CONSTANT is a constant number.

This is useful if you want to create a bar for the progress of a multi-page form: CURRENVALUE is the current page, MAXVALUE is the total number of pages a user has to fill out. CONSTANT is then the size of the bar at a 100%, for example 160 for a 160px bar.

BUGS AND DIFFERENCES TO DJANGO ^

If you find any, please let me know.

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: