|
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 |
TommyD Smarty Rookie
Joined: 20 Feb 2004 Posts: 18
|
Posted: Mon Feb 23, 2004 1:35 pm Post subject: eval as Smarty-Code? |
|
|
Hi!
Does the following thing make sense? What I like to achieve is to be able to do in-place error output for formular elements with localized content.
Code: | de.conf
=====
[login]
error_login = "Falsche Eingabe"
uk.conf
=====
[login]
error_login = "Wrong value"
index.tpl
=====
{config_load file="$language.conf" section="login"}
<form ...>
<input type="text" name="foo">
{eval_smarty value=$error}
...
</form>
index.php
=====
$sm = new Smarty();
$sm->assign("error","error_login");
$sm->display("index.tpl");
|
_________________ Administrator / Developer on http://www.musicmademe.com
- http://thomaskeller.biz |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Feb 23, 2004 2:02 pm Post subject: |
|
|
the localized message should be in {$smarty.config.$error} . no need for an eval here. |
|
Back to top |
|
TommyD Smarty Rookie
Joined: 20 Feb 2004 Posts: 18
|
Posted: Mon Feb 23, 2004 2:06 pm Post subject: |
|
|
Well, I should read the english manual instead of the localized german one =)
Thanks a bunch.
Tommy. _________________ Administrator / Developer on http://www.musicmademe.com
- http://thomaskeller.biz |
|
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
|