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

Any updates on Smarty 3.2?
Goto page Previous  1, 2
 
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 -> Smarty Development
View previous topic :: View next topic  
Author Message
rudder
Smarty Rookie


Joined: 20 Oct 2009
Posts: 14

PostPosted: Fri Apr 07, 2017 12:09 am    Post subject: Reply with quote

Hi AnrDaemon, thanks for being active on this thread.

Could you give the community an update on 3.2 and especially on the support of namespaces?

Specifically it'd be really nice to do something like {\Tools\Help::print_help()}
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Fri Apr 07, 2017 10:46 am    Post subject: Reply with quote

rudder wrote:
Hi AnrDaemon, thanks for being active on this thread.

Could you give the community an update on 3.2 and especially on the support of namespaces?

I'm a forum modeator, not a developer. Sorry if disappointed.

Quote:
Specifically it'd be really nice to do something like {\Tools\Help::print_help()}


You can do it.

$smarty->registerPlugin('function', 'print_help', ['\Tools\Help', 'print_help']);

{print_help}

Doing it directly is not a very sane idea, as it opens up a can of worms Smarty is intended to avoid. I.e. a temptation to overload templates with business logic.
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 -> Smarty Development All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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