Breadcrumbs
Home / Documentation / FLEXIaccess ACL / Menu itemsHide unauthorized menu items in frontend
You’ll need to override your template to hide unauthorized menu items.
Copy the file
modules/mod_mainmenu/tmpl/default.php
In
templates/your_template/html/mod_mainmenu/default.php
This file may already be in.
Edit it and find the lines:
if ($child->attributes('access') > $user->get('aid', 0)) {
$node->removeChild($child);
}
Replace it by:
if (FLEXI_ACCESS) {
if (!FAccess::checkAllItemReadAccess('com_content','read','users',$user->gmid,'menu',$child->attributes('id'))) {
$node->removeChild($child);
}
} else {
if ($child->attributes('access') > $user->get('aid', 0)) {
$node->removeChild($child);
}
}
And that’s all.
NOTE: Some template providers use specific menu systems that could require a particular adaptation. We will offer this payed service very soon. Please contact us on the FLEXIaccess forum for that.



Latest Comments
is there possible overide css to custom alpha-inde...
Thursday 16:42
about translating custom fields you have to use Jo...
Sunday 05:50
flexi acces = Not Found The requested URL /members...
Friday 17:56
I'm not able to download the FLEXIaccess since I r...
Tuesday 17:49