|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
tnt Smarty n00b
Joined: 23 Jul 2004 Posts: 1
|
Posted: Fri Jul 23, 2004 12:42 pm Post subject: Default variable plugins |
|
|
I would like the facility for Smarty to call a plugin or virtual method when it is asked to use an non existant variable. The plugin/method would recevie the variable name (ie. mysite.conf.title) and return the correct value. Thus {$mysite.conf.title|captialize} could be used by the template developer and the variables value will only be read from the config/database if used in the template as opposed to having to be second guessed or all possible variable be assigned using the assign() method before the template is parsed.
Did that make sence. I think currently it is equivelent to doing
{GetVar|capitalise variable="mysite.conf.title"}
which is more confusing to the designer as he has to know which variables are assigned and which are not. |
|
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
|