Hi,
I'm trying to do something VERY simple here and I'm falling at the first hurdle it seems!
I have this in a template:
Reserve Request
So this just attaches the smarty variable for the displayed calendar event. This works ok. I also saw how I could use CMS selflink from a post by Calguy1000 to do the same.
But I now need to get the var from the url and retrieve parts of the event record. I can do this to do this:
ID={$smarty.get.performanceID}
This works too. So I've got the ID of the event I'm after but now I'd like to pass that eventID var to PHP so I can do more stuff within UDT's. This is where I'm lost. I've read some of the smarty manual and it mentions how to pass PHP vars to Smarty but not the other way i.e. from Smarty to PHP.
I think (I know) I'm missing something simple here. Can anyone help?
Sarah
(solved) Smarty vars to PHP? Confused (very)
(solved) Smarty vars to PHP? Confused (very)
Last edited by sarah_h on Sat Mar 22, 2008 4:16 pm, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Smarty vars to PHP? Confused (very)
take a look at $smarty->get_template_vars in the smarty manual
also, you can pass variables into a UDT on the udt tag {myudt variable1=value1 variable2=value2}
then you'd extract their values with $params['variable1'] inside the UDT.
also, you can pass variables into a UDT on the udt tag {myudt variable1=value1 variable2=value2}
then you'd extract their values with $params['variable1'] inside the UDT.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Smarty vars to PHP? Confused (very)
Thanks for that, I knew about get_template_vars but even though I looked through the Smarty manual I didn't see the {myudt variable1=value1 variable2=value2}, but is that because this is a CMSMS thing? I guess so. Anyway it seems that's what I needed, so thanks so much.
BTW I'm really getting into your Calendar module, it's so excellent!!
Sarah
BTW I'm really getting into your Calendar module, it's so excellent!!
Sarah