4
I figured out how to do this. XOOPS uses the following code in header.php to determine if the loaded page is the top page or not:
[size=xx-small] $toppage = false;
if (isset($xoopsModule)) {
// set page title
$xoopsTpl->assign('xoops_pagetitle', $xoopsModule->getVar('name'));
$xoopsTpl->assign('xoops_dirname', $xoopsModule->getVar('dirname'));
$moduleid = $xoopsModule->getVar('mid');
if (preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname')) {
$toppage = true;
}
} else {
$xoopsTpl->assign('xoops_pagetitle', htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES));
$xoopsTpl->assign('xoops_dirname', "system");
$moduleid = 0;
if (!empty($xoopsOption['show_cblock'])) {
$toppage = true;
}
}[/size]
I'll just use similar code to determine which header to render.