Marcus
Well-known member
Is there a way to add a sidebar with the Template Modification System (and I guess xen:callback)? Currently my solution listens to template_post_render with template hint forum_view and adds my_sidebar_forum_view template as sidebar
PHP:
class My_TemplatePostRender_ForumView
{
public static function renderSidebar($templateName, &$content, array &$containerData, XenForo_Template_Abstract $template)
{
$containerData['noVisitorPanel'] = true;
$sidebarTemplate = 'my_sidebar_' . $templateName;
$output = $template->create($sidebarTemplate, $template->getParams());
empty($containerData['sidebar']) ? $containerData['sidebar'] = $output : $containerData['sidebar'] .= $output;
}
}
Last edited: