|
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 |
TheSilentOne Smarty n00b
Joined: 18 Aug 2008 Posts: 2 Location: Kassel / Germany
|
Posted: Mon Aug 18, 2008 7:31 pm Post subject: Smartyvalidate and config vars |
|
|
Hello there!
I want to use language files for the complete template system so that a user can change the displayed language easily.
I chose to save the language data in config files as smarty uses them. So I call the language-variables with {#var#} inside the template file.
Of course I also want the error-messages of smartyvalidate to be displayed in the language that the user has set. And here is the problem:
The syntax for setting a criteria inside the template would be
Code: | {validate form="f1" id="username1" message="{#username1#}" append="error"} |
Obviously this cannot work because of the closing bracket .
What can I do to use config vars inside the critera definition? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Aug 18, 2008 8:18 pm Post subject: |
|
|
No brackets and no quotes
Code: | {validate form="f1" id="username1" message=#username1# append="error"} |
|
|
Back to top |
|
TheSilentOne Smarty n00b
Joined: 18 Aug 2008 Posts: 2 Location: Kassel / Germany
|
Posted: Mon Aug 18, 2008 8:29 pm Post subject: |
|
|
ah, very nice. thank 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
|