Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

HowTo calculate with assigned and config-variables

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
keys71
Smarty n00b


Joined: 16 Mar 2005
Posts: 2

PostPosted: Wed Mar 16, 2005 3:02 pm    Post subject: HowTo calculate with assigned and config-variables Reply with quote

Hi Forum,

the forum search did not succed.
My (simple) question.
I want to add a value defined in a config file add to a assigned variable.

Code:

.php
$smarty->assign('width', $width);

.conf
width_offset = 10

.tpl

{* now i want use the summary of {$width} and {#width_offset#} *}


Kind regards,

Robert
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Mar 16, 2005 4:18 pm    Post subject: Reply with quote

{$width+$smarty.config.width_offset}

see: http://smarty.php.net/manual/en/language.variables.smarty.php
Back to top
View user's profile Send private message
keys71
Smarty n00b


Joined: 16 Mar 2005
Posts: 2

PostPosted: Wed Mar 16, 2005 8:47 pm    Post subject: Reply with quote

thx a lot
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP