Hello
Not sure if im posting this in the rite area but here we go. I am trying to create a simple effective navigation menu for my site but i am struggling with the final coding. Im pretty new to coding.
I have managed to create my navigation sturcture using a menu structure and menu hadler page files, this is all working fine however i would like for when the link is clicked i would like it to load on the same page just in a different area of the page, leaving the navimenu ofn the page so i do not have to insert the code on each page.
I hope that makes sense.
Also i would like to hide the structure of my navigation as currerntly the click shows the full path. eg www.yourdomain.com/file/file.php, i would prfer this to be filtered is this possible?
this is my current menu handler.
<?php
function createMenu($actLink){
include_once('menuStruct.php');
echo '<table class="menutable">';
// Get actual Main menu
$actMenu='';
foreach ($mainMenu as $menu => $link) {
if ($link == $actLink) $actMenu = $menu;
if (isset($subMenu[$menu])){
foreach ($subMenu[$menu] as $menuSub => $linkSub) {
if ($linkSub == $actLink) $actMenu = $menu;
}
}
}
foreach ($mainMenu as $menu => $link) {
echo '<tr><td><a href="'.$link.'">'.$menu.'</a></td></tr>';
if ( ($actMenu == $menu) && (isset($subMenu[$menu])) ){
foreach ($subMenu[$menu] as $menuSub => $linkSub) {
echo '<tr><td><a href="'.$linkSub.'" class="submenu">'.$menuSub.'</a></td></tr>';
}
}
}
echo "</table>";
}
?>