 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
jozeph Smarty n00b
Joined: 23 May 2009 Posts: 2
|
|
| Back to top |
|
alokin Smarty Regular
Joined: 14 Apr 2009 Posts: 96 Location: Belgrade, Serbia
|
Posted: Sat May 23, 2009 8:35 pm Post subject: |
|
|
I think only way to accomplish that is to modify that getlang function to follow "assign pattern", so it can accept assign param, which means that result of that function will be assigned to some variable in template, i.e.:
| Code: |
{getlang data=$body lang=$language assign=foo}
{eval var=$foo}
|
_________________ www.nikolaposa.in.rs |
|
| Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7040 Location: Lincoln Nebraska, USA
|
Posted: Sat May 23, 2009 8:55 pm Post subject: |
|
|
or:
| Code: | {capture name="foo"}{getlang data=$body lang=$language}{/capture}
{eval var=$smarty.capture.foo} |
|
|
| Back to top |
|
jozeph Smarty n00b
Joined: 23 May 2009 Posts: 2
|
Posted: Sun May 24, 2009 9:18 pm Post subject: |
|
|
I've tried this, works fine! Thanks.
| mohrt wrote: | or:
| Code: | {capture name="foo"}{getlang data=$body lang=$language}{/capture}
{eval var=$smarty.capture.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
|