[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/blocks block-Current_Sectio
From: |
Patrick Walsh <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/blocks block-Current_Section.php,NONE,1.1 |
Date: |
Tue, 17 Sep 2002 19:52:02 -0400 |
Update of /cvsroot/phpgroupware/sitemgr/sitemgr-site/blocks
In directory subversions:/tmp/cvs-serv28112/blocks
Added Files:
block-Current_Section.php
Log Message:
Added a navigational block for showing pages and subcats in the currently
viewed category.
--- NEW FILE ---
<?php
if (eregi("block-SiteIndex.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
if ($GLOBALS['page_name'] || $GLOBALS['page_id'] ||
$GLOBALS['category_id'])
{
if ($GLOBALS['page_id'])
{
$page =
ExecMethod('sitemgr.Pages_SO.getPage',$GLOBALS['page_id']);
$cat_id = (int) $page->cat_id;
unset($page);
}
elseif ($GLOBALS['page_name'])
{
$page =
ExecMethod('sitemgr.Pages_SO.getPageByName',$GLOBALS['page_name']);
$cat_id = (int) $page->cat_id;
unset($page);
}
elseif ($GLOBALS['category_id'])
{
$cat_id = (int) $GLOBALS['category_id'];
}
$bo = new bo;
$catlinks = $bo->getCatLinks($cat_id,false);
$pagelinks = $bo->getPageLinks($cat_id,false);
$category =
ExecMethod('sitemgr.Categories_BO.getCategory',$cat_id);
$title = $category->name.' Section';
unset($bo);
$content = '';
if (count($catlinks))
{
$content .= "\n".'<b>Subsections:</b><br>';
foreach ($catlinks as $catlink)
{
$content .=
"\n".' · '.$catlink['link'].'<br>';
}
$content .= '<br>';
}
if (count($pagelinks)>1)
{
$content .= "\n".'<b>Pages:</b><br>';
foreach ($pagelinks as $pagelink)
{
$content .=
' · '.$pagelink['link'].'<br>';
}
}
}
else
{
$content = '';
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/blocks block-Current_Section.php,NONE,1.1,
Patrick Walsh <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/inc class.bo.inc.php,1.6,1.7 class.ui.inc.php,1.7,1.8
- Next by Date:
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/blocks block-Current_Section.php,1.1,1.2
- Previous by thread:
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/inc class.bo.inc.php,1.6,1.7 class.ui.inc.php,1.7,1.8
- Next by thread:
[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/blocks block-Current_Section.php,1.1,1.2
- Index(es):