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

Getting a list of plug-ins used in the template.

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


Joined: 12 Feb 2015
Posts: 2

PostPosted: Thu Feb 12, 2015 2:06 pm    Post subject: Getting a list of plug-ins used in the template. Reply with quote

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 Smile Thanks in advance! Sorry for my English.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5067
Location: Hamburg / Germany

PostPosted: Thu Feb 12, 2015 8:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
X2Com
Smarty n00b


Joined: 12 Feb 2015
Posts: 2

PostPosted: Fri Feb 13, 2015 1:31 pm    Post subject: Reply with quote

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
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