How to define a variable with a variable and an integer

Author Message

esperion H

Monday 14 August 2006 3:59:37 pm

Hi,

Is it possible to define a variable with an other variable and an integer in a template file like this?

{def $myvariable=$ezvariable * 20 }

Of course, I know that

{def $myvariable=$ezvariable}

{def $myvariable=20 }

are both allright, but I could find use also for the above mentioned definition, but I can't get it right. I wondered whether it was doable with a specific syntax.

Thank you for your time.

Cheers

Marcin Drozd

Monday 14 August 2006 4:35:12 pm

Hi
try this:
{def $myvariable=$ezvariable|mul(20) } {* multiple *}
it works for me.
more: http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/mathematics/

http://ez-publish.pl

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.