 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
jmut Smarty Rookie
Joined: 25 Aug 2005 Posts: 20
|
Posted: Wed Jan 04, 2006 3:15 pm Post subject: can I assign new config variable dinamically in smarty |
|
|
I would like to set config variable to some other value.
For example #colspan# is 9 when you run the script.
I would like based on other variable to make
$smarty.config.colspan = $other_variable - 1 for example
and from this point forward #colspan# to be 8. |
|
| Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7038 Location: Lincoln Nebraska, USA
|
Posted: Wed Jan 04, 2006 3:19 pm Post subject: |
|
|
You can't assign config variables, you can only read them.
You might accomplish the need another way:
| Code: | | {math equation="x-y" x=#colspan# y=1 assign="newcolspan"} |
then use {$newcolspan} from that point forward. |
|
| Back to top |
|
jmut Smarty Rookie
Joined: 25 Aug 2005 Posts: 20
|
Posted: Wed Jan 04, 2006 3:23 pm Post subject: |
|
|
| mohrt wrote: | You can't assign config variables, you can only read them.
You might accomplish the need another way:
| Code: | | {math equation="x-y" x=#colspan# y=1 assign="newcolspan"} |
then use {$newcolspan} from that point forward. |
10x |
|
| Back to top |
|
|
|
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
|