Jaxel
Well-known member
Okay, so lets say I have the following function:
Its simple, it adds two parameters to the parameters of the /index page. This worked perfectly fine in previous version of XenForo. However, now it does not. Those parameters are no longer set when I try to access them in my ViewPublic. How do I set these parameters now?
In fact, if I add the following check to the ControllerPublic, it doesnt fire anymore:
Code:
<?php
class EWRporta_ControllerPublic_Index extends XFCP_EWRporta_ControllerPublic_Index
{
public function actionIndex()
{
$response = parent::actionIndex();
$response->params['layout1'] = 'index';
$response->params['layout2'] = 'portal';
return $response;
}
}
Its simple, it adds two parameters to the parameters of the /index page. This worked perfectly fine in previous version of XenForo. However, now it does not. Those parameters are no longer set when I try to access them in my ViewPublic. How do I set these parameters now?
Code:
<?php
class EWRporta_ViewPublic_Custom extends XFCP_EWRporta_ViewPublic_Custom
{
public function renderHtml()
{
if (empty($this->_params['layout1']))
{
echo "NO LAYOUT GIVEN"; exit;
}
}
}
In fact, if I add the following check to the ControllerPublic, it doesnt fire anymore:
Code:
if ($response instanceof XenForo_ControllerResponse_View)
{
echo "IS INSTANCEOF VIEW"; exit;
}
Last edited: