|
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 |
nielsNL Smarty Rookie
Joined: 03 May 2009 Posts: 17
|
Posted: Tue Oct 27, 2009 10:24 am Post subject: Short way to use constants in Smarty3 |
|
|
Hello,
In our Fusion Ticket project we use now a hacked version of smarty2.6.
This hack helps us to use constants more easier then the Smarty.const.<constname>
For this we introduced the type !<constname>!, this was a wrong choice but it works. Now we like to move to Smarty3 and like the same possibility in Smarty3. Can you please help us with this or add it natively in Smarty3?
Our thanks is greet.
Greetings
Niels v/d Spek
Team Fusion Ticket. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Oct 27, 2009 9:14 pm Post subject: |
|
|
No hacks necessary, use a prefilter:
search:
!FOO!
replace:
{$smarty.const.FOO} |
|
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
|