Hi All,
I want to get a value that is count number of selected items of multi-select combo. I got this value from tpl file. But I don't know how to get back this value to php file! I'd like to describe it in text box. how to code?
get value from tpl?
Moderator: General Moderators
Re: get value from tpl?
how about {capture}? if so, how to code?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: get value from tpl?
That sounds really hackish, usually you perform all calculations inside the Model (View maybe) then assign values to the template for immediate rendering...why are you trying to send a count value back to PHP, I think it's technically impossible as the template usually renders after business logic, etc so at the very most you would be able to log the counter value.
Use a global or increment a value passed in, and echo the value in side PHP after the template.
Secondly, ask in Smarty forums, seeing as this is a Smarty issue you will stand better luck getting an answer there.
Cheers,
Alex
Use a global or increment a value passed in, and echo the value in side PHP after the template.
Secondly, ask in Smarty forums, seeing as this is a Smarty issue you will stand better luck getting an answer there.
Cheers,
Alex
Re: get value from tpl?
Thanks PCSpectra. Now I get it! See more : http://www.smarty.net/forums/viewtopic. ... 1849#61849