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.



Comments
best regards
RSS feed for comments to this post.
Add comment