Question

I can't seem to get the syntax correct for this: divide maths calculation.

{assign var="span" value="`12/$rows|@count`"}

Docs - http://www.smarty.net/docs/en/language.math.tpl

Was it helpful?

Solution

Try this :

{assign var="count" value=$rows|@count}
{math assign="span" equation='x/y' x=12 y=$count} 

Ref: http://www.smarty.net/forums/viewtopic.php?p=66730

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top