Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Modifier - get Smarty object?

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
kaitlyn2004
Smarty Regular


Joined: 26 Apr 2007
Posts: 47

PostPosted: Tue Aug 16, 2011 1:34 pm    Post subject: Modifier - get Smarty object? Reply with quote

It seems all plugins supply the template object EXCEPT the modifier plugin implementation.

Is there any (easy) way to write a modifier function but have access to the Smarty object?
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Tue Aug 16, 2011 1:55 pm    Post subject: Reply with quote

currently there is not. We've been playing with possible solutions to this problem, but have nothing concrete yet.
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7366
Location: Lincoln Nebraska, USA

PostPosted: Tue Aug 16, 2011 2:17 pm    Post subject: Reply with quote

One solution is to implement a singleton, and use that within your modifier.

http://www.smarty.net/forums/viewtopic.php?t=16604
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins 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