|
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 |
VEG Smarty Rookie
Joined: 02 May 2010 Posts: 20 Location: Belarus
|
Posted: Tue Dec 13, 2011 8:43 am Post subject: How to remame {block} tag? |
|
|
Can I rename {block} to {area} tag?
I tried to rename the file smarty_internal_compile_block.php to smarty_internal_compile_area.php, class Smarty_Internal_Compile_Block to Smarty_Internal_Compile_Area, Smarty_Internal_Compile_Blockclose to Smarty_Internal_Compile_Areaclose, but this does not work. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Tue Dec 13, 2011 9:04 pm Post subject: |
|
|
You can't rename it by just renaming the file and class name. The tag {block} is uced also inside the smarty code.
Also irts not a good idea the rename build in tags. You will not be able to update Smarty for bug fixes or new verison withou complications |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Dec 13, 2011 11:45 pm Post subject: |
|
|
Don't try to change the internals of Smarty. If you want to use {compile} istead of {block} in your templates, write a prefilter that does the swap just before compile time. |
|
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
|