0
我想加在我的模板文件乘三個值,但智者與我搞亂數學在smarty中的問題!
{assign var="x" value="`$smarty.get.pageID * $perPage`"}
{$x + $smarty.section.co.index_next}
我怎樣才能做到這一點?
我想加在我的模板文件乘三個值,但智者與我搞亂數學在smarty中的問題!
{assign var="x" value="`$smarty.get.pageID * $perPage`"}
{$x + $smarty.section.co.index_next}
我怎樣才能做到這一點?
對不起,這是一個愚蠢的問題,我解決這個問題是這樣的:
{if $smarty.get.pageID ne 1 }
{assign var="x" value=$smarty.get.pageID}
{math equation="((x * y) + z)" x=$x y=$perPage z=$smarty.section.co.index_next}
{else}
{$smarty.section.co.index_next}
{/if}
你得到什麼輸出? – AndyMcKenna 2009-07-02 16:16:01