View previous topic :: View next topic |
Author |
Message |
mpk Smarty Rookie
Joined: 26 Jun 2003 Posts: 9 Location: Amsterdam, Netherlands
|
Posted: Thu Jun 26, 2003 9:57 am Post subject: Variable in a variable or nested variables |
|
|
Hi,
My problem is the following: I want to include a variable in another variable and to be more specific I want to pass variables to the overlib function.
My code tries to do something like this:
{popup caption="Details" text="{$myvar}" snapx=10 snapy=10}.
But this won't work because it stops at the first right delimiter.
Is there anyway to do this? I searched the forum, but have found no answer yet.
Thanks.- |
|
Back to top |
|
mischa Smarty Rookie
Joined: 30 Apr 2003 Posts: 19 Location: Suhr, Switzerland
|
Posted: Thu Jun 26, 2003 12:52 pm Post subject: |
|
|
Hi
try this:
Code: | {popup caption="Details" text=$myvar snapx=10 snapy=10}
|
PS: have a look at domTT
http://www.mojavelinux.com/forum/viewtopic.php?t=127
i've done a smarty-function too. first i've tried it with overlib, but it had some problems on several browsers. domTT works better for me. |
|
Back to top |
|
mpk Smarty Rookie
Joined: 26 Jun 2003 Posts: 9 Location: Amsterdam, Netherlands
|
Posted: Thu Jun 26, 2003 2:16 pm Post subject: |
|
|
Many thanks. It works!
I'm very impressed from domTT. Is your function public? |
|
Back to top |
|
stefano Smarty n00b
Joined: 28 Jun 2003 Posts: 2
|
Posted: Sat Jun 28, 2003 1:01 am Post subject: Problem with array variables in popup |
|
|
Obliquid, our open source PHP/XML framework, was using Smarty 2.3.0. Today I decided to upgrade CVS version to Smarty 2.5.0, but a problem arose.
I was getting elements from array variables inside overlib popups with this syntax:
Code: | {{popup text="$msg[edit]"}} |
Now it doesn't work anymore. I tried $msg.edit, but doesn't work either.
Any suggestions?
Thankyou
Stefano _________________ http://dev.obliquid.com/ |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
|
Back to top |
|
stefano Smarty n00b
Joined: 28 Jun 2003 Posts: 2
|
Posted: Wed Jul 02, 2003 8:34 pm Post subject: |
|
|
I tried and it works, Thank you
Stefano _________________ http://dev.obliquid.com/ |
|
Back to top |
|
mpk Smarty Rookie
Joined: 26 Jun 2003 Posts: 9 Location: Amsterdam, Netherlands
|
Posted: Tue Jul 22, 2003 8:40 am Post subject: On the same issue |
|
|
I cannot make this work with objects: Let's say $object is an object, I'm trying
{{popup text="`$object->field`"}}
{{popup text="`$object[field]`"}}
{{popup text="`$object.field`"}}
And none seems to work. Any ideas?
Thanks.- |
|
Back to top |
|
mpk Smarty Rookie
Joined: 26 Jun 2003 Posts: 9 Location: Amsterdam, Netherlands
|
Posted: Tue Jul 22, 2003 10:28 am Post subject: Ok sorry for this |
|
|
I'm really blind. Is again the same i.e.
text=$myobj->var |
|
Back to top |
|
|