<?php
//default show subnav yes
if(!isset($showSubnav)) {
$showSubnav = 1;
}
// get the current pageID
$pageID = $post->ID;
// From the pageID, find the id of it's root page
if ($post->post_parent) {
// There is a parent so get the ancestors
$ancestors=get_post_ancestors($post->ID);
$root=count($ancestors)-1;
$rootParentID = $ancestors[$root];
} else {
// otherwise current page is root page
$rootParentID = $post->ID;
}
//get page title of root page
$rootPageName = get_page_name($rootParentID);
//get child page list of current page
$pageList = get_page_list($post);
// if the page list returns no results then don't show it.
if ( $pageList == "") {
$showSubnav = 0;
}
?>
<?php
// by default show the subnav. If not then just...
Categories
- Administration (3)
- ColdFusion (20)
- Content Engine (1)
- CSS (10)
- DHTML (2)
- Documentation (2)
- Drupal (1)
- Email (13)
- Encryption (1)
- Flash (12)
- FTP (6)
- Google Maps (1)
- HTML (25)
- ITS (1)
- JavaScript (12)
- Linux (4)
- Network (6)
- PDF (3)
- PHP (8)
- Security Framework (12)
- Server Maintenance (1)
- Site Setup (2)
- SQL (22)
- SQLServer (1)
- SSL (5)
- Windows Tips & Tricks (12)
- Wordpress (3)
Archives
Subscribe With Us

