Geo3010 Posted August 1, 2014 Share Posted August 1, 2014 The BO menu is made of main pages, or tabs, (like "Preferences") which can contain a sub menu of sub tabs (like "General", "Orders", "Products", ...). It seems that when you click on the parent tab, the action focuses on its first sub tab. Now if I create a profile not allowed to access the first sub tab of a menu tab, when an employee with such profile clicks on the parent menu tab, the system raises an "Access denied" error. It seems that the error raises simply because the parent does not focus on its first ACCESSIBLE sub tab but stubbornly on its first sub tab, accessible or not! Can it be? Is there a way to set the "parent" focus? Thank you. Link to comment Share on other sites More sharing options...
Geo3010 Posted August 1, 2014 Author Share Posted August 1, 2014 In fact, the trouble comes from this link: <a href="{if $t.sub_tabs|@count && isset($t.sub_tabs[0].href)}{$t.sub_tabs[0].href}{else}{$t.href}{/if}" class="title" > <i class="icon-{$t.class_name}"></i> <span>{if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if}</span> </a> inside admin/themes/default/template/nav.tpl And in particular: $t.sub_tabs[0] Link to comment Share on other sites More sharing options...
Geo3010 Posted August 1, 2014 Author Share Posted August 1, 2014 Workaround: {if $t.sub_tabs|@count && reset($t.sub_tabs)} {assign var="first_k" value=key($t.sub_tabs)} {/if} <a href="{if $t.sub_tabs|@count && isset($t.sub_tabs[$first_k].href)}{$t.sub_tabs[$first_k].href}{else}{$t.href}{/if}" class="title" > <i class="icon-{$t.class_name}"></i> <span>{if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if}</span> </a> Link to comment Share on other sites More sharing options...
Recommended Posts