Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

$smarty.const vs |constant

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Lexis
Smarty n00b


Joined: 11 Apr 2016
Posts: 1

PostPosted: Mon Apr 11, 2016 7:15 pm    Post subject: $smarty.const vs |constant Reply with quote

I use {$smarty.const.NAME} to access PHP constants. I can find this in the smary 3 documentation.

I was browsing through some templates and found a template where constants are accessed with {'NAME'|constant}.
I tried to find this method in the documentation, but cannot find it.
Can someone please tell me if this is the good method to use with smarty3, and where I can find it in the docs?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Apr 12, 2016 12:11 am    Post subject: Reply with quote

http://php.net/constant
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Wed Apr 20, 2016 12:26 am    Post subject: Reply with quote

That application must have implemented a custom modifier constant.
It's not standard Smarty.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Apr 20, 2016 1:39 pm    Post subject: Reply with quote

U.Tews wrote:
It's not standard Smarty.

But it is standard PHP.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General 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