Path

ez.no / exponential / documentation / incoming / hide shop/setup navigation tab / one way to do it ... as i j...


One way to do it ... as I just did in 3.5

Here's how to disable and hide certain tabs from the admin menu.

First, modify global site access settings in /settings/override/site.ini.append.php. Here's my example to hide the "design" and "webshop" tabs:

[SiteAccessRules]
Rules[]
# Enable all functions
Rules[]=Access;enable
Rules[]=ModuleAll;true
# Disable design and shop
Rules[]=Access;disable
Rules[]=Module;visual
Rules[]=Module;shop

Try clicking on the tabs ... you should get an error saying they've been disabled.

Now just override the pagelayout.tpl template for the admin design to hide the tabs you want. In the default 3.5 admin pagelayout.tpl I changed:

{section var=Menu loop=topmenu($ui_context)}
{include uri='design:page_topmenuitem.tpl' menu_item=$Menu navigationpart_identifier=$navigation_part.identifier}
{/section}

to this:

{section var=Menu loop=topmenu($ui_context)}

{* Here I insert switch statement to skip design and webshop tabs *}
{switch match=$Menu.url}
{case match="shop/orderlist"}{/case}
{case match="visual/menuconfig"}{/case}
{case}
{include uri='design:page_topmenuitem.tpl' menu_item=$Menu navigationpart_identifier=$navigation_part.identifier}
{/case}
{/switch}

{/section}

Modified by Joel Hardi on 04/01/2005 at 8:47:39 pm