Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
short form of {$smarty.const.__name__}

 
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
bimal
Smarty Elite


Joined: 19 Apr 2007
Posts: 420
Location: Kathmandu, Nepal

PostPosted: Mon Feb 06, 2012 4:28 pm    Post subject: short form of {$smarty.const.__name__} Reply with quote

You can have an alternative way to {$smarty.const.constant_name} as
Code:
{'constant_name'|constant}


Thus you can write less code.
But be sure that the constant exist, otherwise, you will receive PHP error message.

Hope, this is a helpful piece of trick.[/code]
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks 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