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

Default variable plugins

 
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 -> Feature Requests
View previous topic :: View next topic  
Author Message
tnt
Smarty n00b


Joined: 23 Jul 2004
Posts: 1

PostPosted: Fri Jul 23, 2004 12:42 pm    Post subject: Default variable plugins Reply with quote

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
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 -> Feature Requests 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