
Dotiac::DTL::Tag::widthratio - The {% widthratio CURRENTVALUE MAXVALUE CONSTANT %} tag

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

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.

If you find any, please let me know.

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

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

Marc-Sebastian Lucksch
perl@marc-s.de