Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

see code output generated by smarty?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
nileshd
Smarty n00b


Joined: 07 Jul 2003
Posts: 2

PostPosted: Mon Jul 07, 2003 8:06 pm    Post subject: see code output generated by smarty? Reply with quote

Is there a way to see the source code generated by smarty?

I want to use smarty in a php code generator application. I will replace smarty tags with php code and html code. Is there a way I can see the final output of my file after smarty processes it, without accessing it from a browser?

I want o use something like show_source to view the generated output file? Is it that smarty can do?


Last edited by nileshd on Mon Jul 07, 2003 8:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Mon Jul 07, 2003 8:09 pm    Post subject: Reply with quote

If you mean the fully transformed template output then you can do so by using

Code:
$output = $smarty->fetch('template.tpl');


(ie. instead of $smarty->display('template.tpl'); )

If you mean the compiled templates, they are in whatever you pointed $smarty->compile_dir to, though you may have to dig through some subdirs to find the appropriate file.

HTH
Back to top
View user's profile Send private message
nileshd
Smarty n00b


Joined: 07 Jul 2003
Posts: 2

PostPosted: Mon Jul 07, 2003 8:11 pm    Post subject: thanks Reply with quote

I think this is what I needed. Looked through the docs again and again for something like this.. I just seem to have missed this.. This is exactly what I was looking for.. Thanks boots !
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General 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