Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

How to remame {block} tag?

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
VEG
Smarty Rookie


Joined: 02 May 2010
Posts: 20
Location: Belarus

PostPosted: Tue Dec 13, 2011 8:43 am    Post subject: How to remame {block} tag? Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Tue Dec 13, 2011 9:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7366
Location: Lincoln Nebraska, USA

PostPosted: Tue Dec 13, 2011 11:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3 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