<?php
/* --------------------------------------------------------------------------------------------
 * source file: \Sentra.Designs\BasicDesigner\modules\menues\verticalcommon_navi\commonnavi.tpl
 * --------------------------------------------------------------------------------------------
 *
 * Function: vertical common pages navi
 * ~~~~~~~~~
 * --------------------------------------------------------------------*/

$myPages = get_sub_pages("n0");	/* Descriptor of all subpages under HOME */
If ($myPages['count'] > 0) {
	$hascommonnavi[$CURRENT_PAGE['id']] = TRUE;

//	DEBUG($CURRENT_PAGE['caption'].': #commonpages = '.$myPages['count']);
	$HOME = get_home_page();
	echo '<ul class="common-navi">'.PHP_EOL;
	If ($IS_HOME) {
	echo 	'<li class="home"><a class="current" '.generate_link($HOME).'>'.$HOME['caption'].'</a></li>'.PHP_EOL;
	} Else {
	echo '<li class="home"><a '.generate_link($HOME).'>'.$HOME['caption'].'</a></li>'.PHP_EOL;
	}

	for ($x = 0; $x < $myPages['count']; $x++) {
		If ($CURRENT_PAGE['id'] == $myPages[$x]['id']) { // Abfrage ob eine Common Page Hightlight Link aktiv
				echo '<li><a class="current" href="<?php echo SENTRA_HOME;?>'.$myPages[$x]['filename'].'" '.MakeLinkTitle($myPages[$x]).' >'.print_caption($myPages[$x]).'</a></li>'.PHP_EOL;
		} Else {
				echo '<li><a href="<?php echo SENTRA_HOME;?>'.$myPages[$x]['filename'].'" '.MakeLinkTitle($myPages[$x]).' >'.print_caption($myPages[$x]).'</a></li>'.PHP_EOL;
		}
	}

	echo '</ul>	<!-- Close id="common-navi" -->'.PHP_EOL;
}

?>