I am sure this is a fairly simple question to answer, but I am new to PHP, so I was hoping someone could help me solve this problem.
I have a dynamic navigation menu that works really well, but I want to remove the link from the current page in the menu.
Here is my code:
<div id="navigation_menu">
<?
foreach($pagedata->menu as $menuitem){
$class = ($menuitem->uri == $requesteduri) ? 'navigation selection' : 'navigation page_select';
?>
<div id="<?=$menuitem->uri?>" class="<?=$class?>">
<img class="nav_icon" src="<?=PROTOCOL?>//<?=DOMAIN?>/img/<?=$menuitem->uri?>.png">
<h1><a href="<?=PROTOCOL?>//<?=DOMAIN?>/<?=$menuitem->uri?>"><?=$menuitem->title?></a></h1>
<h2><?=$menuitem->description?></h2>
<img class="go" src="<?=PROTOCOL?>//<?=DOMAIN?>/img/go.png">
</div>
<?
}
?>
</div>
Any help would be greatly appreciated. Thanks!
UPDATED CODE: (this is what works for me now)
<div id="navigation_menu">
<?
foreach($pagedata->menu as $menuitem){
$class = ($menuitem->uri == $requesteduri) ? 'navigation selection' : 'navigation page_select';
?>
<div id="<?=$menuitem->uri?>" class="<?=$class?>">
<img class="nav_icon" src="<?=PROTOCOL?>//<?=DOMAIN?>/img/<?=$menuitem->uri?>.png">
<h1>
<?php if ($menuitem->uri == $requesteduri):?>
<?=$menuitem->title;?>
<?php else: ?>
<a href="<?=PROTOCOL?>//<?=DOMAIN?>/<?=$menuitem->uri?>"><?=$menuitem->title?></a>
<?php endif;?>
</h1>
<h2><?=$menuitem->description?></h2>
<img class="go" src="<?=PROTOCOL?>//<?=DOMAIN?>/img/go.png">
</div>
<?
}
?>
</div>