|
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 |
nileshd Smarty n00b
Joined: 07 Jul 2003 Posts: 2
|
Posted: Mon Jul 07, 2003 8:06 pm Post subject: see code output generated by smarty? |
|
|
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 |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon Jul 07, 2003 8:09 pm Post subject: |
|
|
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 |
|
nileshd Smarty n00b
Joined: 07 Jul 2003 Posts: 2
|
Posted: Mon Jul 07, 2003 8:11 pm Post subject: thanks |
|
|
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 |
|
|
|
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
|