Marcus
Well-known member
I have lots of ControllerPublic::action functions returning their results by template hook, all of which I now translate to xen:callback.
xen:callback does not like the action parameter, instead I can use return, get, view. When I use the get function and rename my action function to get, functionality as $this->_input->filterSingle gets lost.
xen:callback does not like the action parameter, instead I can use return, get, view. When I use the get function and rename my action function to get, functionality as $this->_input->filterSingle gets lost.
PHP:
<xen:callback class="My_ControllerPublic_Forum" method="getIndex"></xen:callback>
PHP:
class My_ControllerPublic_Forum extends XenForo_ControllerPublic_Abstract
{
public function getIndex()
{
$forumId = $this->_input->filterSingle('node_id', XenForo_Input::UINT);
$myVar = $forumId*5; // for testing obviously
$viewParams = array(
'myVar' => $myVar ,
);
return $this->responseView(
'My_ViewPublic_My',
'my_sidebar_forum_list',
$viewParams
);