Claiver
Member
In my CakePHP application I would like to load the header template, with XenForo taking the current session into account. The template looks like this:
What XenForo files should I include() with PHP? Currently I've experimented with including the Autoloader and initializing the application. Since there's no developer documentation available, I figure my best bet is to count on your knowledge.
What I've got:
What method/class should I invoke in order to load a specific template into my CakePHP application? Is there a hook I should call? (the "header" hook?)
Code:
<xen:hook name="header">
<div id="header">
<xen:include template="logo_block" />
<xen:include template="navigation" />
<xen:if is="{$canSearch}"><xen:include template="search_bar" /></xen:if>
</div>
</xen:hook>
What XenForo files should I include() with PHP? Currently I've experimented with including the Autoloader and initializing the application. Since there's no developer documentation available, I figure my best bet is to count on your knowledge.
What I've got:
Code:
require_once($fileDir . '/library/XenForo/Autoloader.php');
$xf = XenForo_Autoloader::getInstance();
$xf->setupAutoloader($fileDir . '/library');
XenForo_Application::initialize($fileDir . '/library', $fileDir);
What method/class should I invoke in order to load a specific template into my CakePHP application? Is there a hook I should call? (the "header" hook?)