|
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 |
bimal Smarty Elite
Joined: 19 Apr 2007 Posts: 423
|
Posted: Wed Jun 20, 2012 6:19 am Post subject: {#CONFIGNAME#|modifier} works |
|
|
I was just wondering if I can use some modifiers with the config variables.
I was happy to find it working well.
The following independent code pieces result satisfactory.
Code: |
{if #LIVE# eq 'true'}You are running a live system.{/if}
{if #LIVE#|matchtrue}You are running a live system.{/if}
{if !(#LIVE#|matchtrue)}You are running a demo system.{/if}
|
FYI,
modifier.matchtrue.php
Code: |
function smarty_modifier_matchtrue($value=null)
{
return $value?true:false;
}
|
Hope, this post helps you. |
|
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
|