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