Razorblade wrote:
> 
> 
> Hi, 
> I need to get the returned object from an action helper, within a layout
> view script.
> How to get the helper object and use it?
> Thanks
> 
> Sergio Rinaudo
> 
> 

to pass data from action itself to the view or in your case to a layout
(which is similar to a view), you could pass the var to the view like this:
$this->view->myvar = $myvar;

the content of your $myvar can be an object, if its the case you could use
it like this in your view or layout:

echo $this->escape($this->myvar->myoption);

in your action helper you do something and after its done you probably want
to return some data to the action:

return $myData;

then could call the helper in your action like this:

$myHelperData = $this->_helper->myhelperxy($myParam);

then as i said you pass the data to the view or layout, see above ...

a good article about action helpers can be found here:

http://devzone.zend.com/article/3350



-- 
View this message in context: 
http://www.nabble.com/Get-an-action-helper-object-within-a-layout-view-script.-tp23653470p23676276.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to