|
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 |
shuther Smarty Rookie
Joined: 04 Jan 2004 Posts: 13
|
Posted: Sat Mar 27, 2004 2:15 pm Post subject: compile function |
|
|
I am not sure it is the rigth place for this.
On the Smarty_Compiler class, line around 620 (function _compile_compiler_tag), smarty adds <?php and ?> between the output of the plugins, and I am not sure it should be done. In my case, I want to output directly some html code.Could it be removed?
Also, would it be possible to put every smarty_compile functions in the plugins directory?
Finally, I would like to create modifier/block/... compile functions, is it possible? And how can I do that?
Thank you very much |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sun Mar 28, 2004 10:42 am Post subject: Re: compile function |
|
|
shuther wrote: | I am not sure it is the rigth place for this.
On the Smarty_Compiler class, line around 620 (function _compile_compiler_tag), smarty adds <?php and ?> between the output of the plugins, and I am not sure it should be done. In my case, I want to output directly some html code.Could it be removed?
|
you have to return "?>your html<?php" or "echo 'your html';" then.
Quote: | Also, would it be possible to put every smarty_compile functions in the plugins directory?
Finally, I would like to create modifier/block/... compile functions, is it possible? And how can I do that? |
you can extend class Smarty_Compiler and configure $smarty with your version of $smarty->compiler_file and $smarty->compiler_class .
this enables you to overload the methods of Smarty_Compiler in question.
HTH |
|
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
|