Code: Select all
<param name="anchor" type="text" default="" label="Type Anchor Name (optional)" description="A named anchor in the article(optional)" />
That causes a textbox to show where you can enter the named anchor you want to link to when creating the menu item.
Inside modules\mod_mainmenu\helper.php, I changed
Code: Select all
default :
$router = JSite::getRouter();
$tmp->url = $router->getMode() == JROUTER_MODE_SEF ? 'index.php?Itemid='.$tmp->id : $tmp->link.'&Itemid='.$tmp->id;
break;
Code: Select all
default :
$router = JSite::getRouter();
//$tmp->url = $router->getMode() == JROUTER_MODE_SEF ? 'index.php?Itemid='.$tmp->id : $tmp->link.'&Itemid='.$tmp->id;
if($iParams->get('anchor') != ''){
$tmp->url = $router->getMode() == JROUTER_MODE_SEF ? 'index.php?Itemid='.$tmp->id : $tmp->link.'&Itemid='.$tmp->id.'#'.$iParams->get('anchor');
}else{
$tmp->url = $router->getMode() == JROUTER_MODE_SEF ? 'index.php?Itemid='.$tmp->id : $tmp->link.'&Itemid='.$tmp->id;
}
break;
I've also attached the files.