|
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 |
X2Com Smarty n00b
Joined: 12 Feb 2015 Posts: 2
|
Posted: Thu Feb 12, 2015 2:06 pm Post subject: Getting a list of plug-ins used in the template. |
|
|
Tell me, please, is there a way to know which plug-ins are used in a specific template. Manual parsing of template are not accepted Thanks in advance! Sorry for my English. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Feb 12, 2015 8:07 pm Post subject: |
|
|
There is currently only a way to obtain all used tags (built in and plugins)
Code: | $tpl = $smarty->createTemplate('foo.tpl');
$tags = Smarty_Internal_Utility::getTags($tpl); |
This does return an array with the used tag names. Please note that this function does call the compiler. So it does not have best performance. |
|
Back to top |
|
X2Com Smarty n00b
Joined: 12 Feb 2015 Posts: 2
|
Posted: Fri Feb 13, 2015 1:31 pm Post subject: |
|
|
U.Tews, thanks for the help. I'll try your code. Call the compiler - I am not afraid, as this code will run only when writing/editing a template. |
|
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
|