Friday 24 October 2003 11:58:23 am
I need to do some calculations in a template (pagelayout.tpl), like this pseudo-code:
level=$node.path.depth (not correct, but you get the point)
span1=level+1
if span1>10 then span1=10 span2=10-span2
As you might imagine, this will be used for two column-spans in a table, which has 10 columns.
I even have a problem with the first assignement. I tried
{let level=$the_variable_name}
but even that did not work. Is "level" a reserved word?
For the other lines, I will need the "inc", "min" and "sub" operators (from http://ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/operators/arithmetics), but I don't know, how to use them for the calculations I need.
Any code-hint (or working example code-snippet) is highly appreciated! TIA
Marco
http://www.hyperroad-design.com
|