<?php //require '../public/system/headers/headers.php';?>
<ul id="main_menu">
    <?php foreach ($this->sitePages as $sitePage): ?>
	<?php if($sitePage['h1'] == 'no category'): ?>
            <li>
		<ul class="nocategory">
		    <?php foreach ($sitePage['pages'] as $subPage): ?>
			<li><a title="<?php echo $subPage['h1']; ?>" href="<?php echo ($subPage['url'] != 'index') ? $this->websiteUrl . $subPage['url'] . '.html' : $this->websiteUrl ; ?>" ><?php echo $subPage['navigationTitle']; ?></a></li>
		    <?php endforeach; ?>
		</ul>
	    </li>
	    <?php else: ?>
	    <?php $this->classCounter++; ?>
	    <li class="cat-<?php echo $this->classCounter; ?> category"><a title="<?php echo $sitePage['h1']; ?>" href="<?php echo $this->websiteUrl . $sitePage['url'] . '.html'; ?>" ><?php echo $sitePage['navigationTitle']; ?></a>
		<ul id="<?php echo $sitePage['url']; ?>">
		    <?php foreach ($sitePage['pages'] as $subPage): ?>
			<li class="page"><a title="<?php echo $subPage['h1']; ?>" href="<?php echo ($subPage['url'] != 'index') ? $this->websiteUrl . $subPage['url'] . '.html' : $this->websiteUrl ; ?>" ><?php echo $subPage['navigationTitle']; ?></a></li>
		    <?php endforeach; ?>
		</ul>
	    </li>
	<?php endif; ?>
    <?php endforeach; ?>
</ul>