if (!$skipSidebarWidgets)
{
$topWidgets = $templater->widgetPosition('pub_sidebar_top');
$bottomWidgets = $templater->widgetPosition('pub_sidebar_bottom');
$templater->modifySidebarHtml('_xfWidgetPositionPubSidebarTop', $topWidgets, 'prepend');
$templater->modifySidebarHtml('_xfWidgetPositionPubSidebarBottom', $bottomWidgets, 'append');
$params['sidebar'] = $templater->getSidebarHtml();
$params['sideNav'] = $templater->getSideNavHtml();
}