Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
Auto-Create Template Comments?

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


Joined: 05 Nov 2009
Posts: 1

PostPosted: Thu Nov 05, 2009 8:17 pm    Post subject: Auto-Create Template Comments? Reply with quote

Hi all...

I'm curious if there is a simple way for smarty to generate HTML comments at the beginning and the end of each template, so that in my page source I can see where and which template has been called.

Page source example:

<!-- START: template.tpl -->
Template HTML Here
<!-- END: template.tpl -->

I'd need this to happen for each instance I use $smarty->fetch() as well as each instance inside a template I call: {include file="template2.tpl"}

Any help is appreciated!

Thanks,
B
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Thu Nov 05, 2009 8:29 pm    Post subject: Reply with quote

Write a prefilter which does add the comments and {$smarty.template} tags.
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