|
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 |
rudder Smarty Rookie
Joined: 20 Oct 2009 Posts: 14
|
Posted: Fri Apr 07, 2017 12:09 am Post subject: |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Apr 07, 2017 10:46 am Post subject: |
|
|
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 |
|
|
|
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
|