 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
sudaraka Smarty n00b
Joined: 28 Jan 2010 Posts: 3
|
Posted: Thu Jan 28, 2010 12:52 pm Post subject: Get list of included template (.tpl) file names |
|
|
Hi all,
Does any one know if there's a way to get a names for all the template files used to create the final HTML output?
Like for example let's say I have mypage.tpl and it includes top.tpl and bottom.tpl and in top.tpl it includes head.tpl and menu.tpl
So after display or fetch, I need to get the list containing top.tpl, head.tpl, menu.tpl and bottom.tpl
Any ideas?
Thanks. |
|
| Back to top |
|
sudaraka Smarty n00b
Joined: 28 Jan 2010 Posts: 3
|
Posted: Mon Feb 08, 2010 1:27 am Post subject: Solution found |
|
|
Found a solution with my own research, please see details on EE question I posted. I will post the url below.
p.s
wonder why no one replied even after 50+ views
anyway, contact me if anyone need more details on this.[/url] |
|
| Back to top |
|
sudaraka Smarty n00b
Joined: 28 Jan 2010 Posts: 3
|
|
| Back to top |
|
eithe Smarty n00b
Joined: 15 Oct 2010 Posts: 4
|
Posted: Tue Aug 16, 2011 9:07 am Post subject: |
|
|
| As I needed this as well here's the solution - all the templates are created using $Smarty->createTemplate function and stored in the $Smarty->template_objects array indexed by sha'd key. But, they are stored as objects, so you can either iterate by it, accessing either template_resource (the full path is accessible through template_filepath), or create an $Smarty->included_templates array and assign the templates to it as well. |
|
| 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
|