XF 1.5 set page title with PHP

ungovernable

Active member
I use this code to display a page node with my custom PHP code:
Code:
class ungovernable_page_ControllerPublic_test
{
    public static function getTest(XenForo_ControllerPublic_Abstract $controller, XenForo_ControllerResponse_Abstract &$response)
    {
        $page_title = "not working";
        $response->params['page.title'] = $page_title;
        $response->params['title'] = $page_title;
        $response->params['html'] = $html;
        return $response;
   
    }
}
But how can I set the page title?

I also added the title to the template, but it doesn't display
1588398067105.webp
 
It's
PHP:
$response->params['page']['title'] = $page_title;

And you don't need this:
Code:
<xen:title>{xen:raw $title}</xen:title>

Btw.
PHP:
Zend_Debug::dump($response);
is your help in need. :)
 
Back
Top Bottom