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

Overload $Smarty->assign(), Hints?

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


Joined: 20 Dec 2011
Posts: 245
Location: West Coast

PostPosted: Sat Dec 31, 2016 3:31 am    Post subject: Overload $Smarty->assign(), Hints? Reply with quote

I am wanting to do this:
Code:
$Smarty->assign(String $name, Mixed $val, [options, ...])

where the options are anything I want to do.

Specifically:
Code:
$Smarty->assign(String $name, Mixed $val, nodebug)

The specific example will, at some point in compiling the template with the {debug} function in it, remove (or skip over) that template variable from the collection of template variables when rendering the debug template.

Any hints?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1572

PostPosted: Sat Dec 31, 2016 5:32 pm    Post subject: Reply with quote

Hint: Don't do that.

It will, inevitable, confuse you and anyone else trying to debug the template.
Back to top
View user's profile Send private message
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