XF 1.5 set page title with PHP

  • Thread starter Thread starter Deleted member 122910
  • Start date Start date
D

Deleted member 122910

Guest
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
 
Any support? What I'm trying to do should be easy, just need to know where I can find the information ...
 
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. :)
 
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. :)
Thanks a lot! Exactly what I needed!
 
Back
Top Bottom