2016-10-20 5 views
0

Код добавляет новое меню в backend. Но у меня есть проблема с разрешением на новой странице. Я добавляю контроллер и помощник.Меню администратора Magento Acl

Мой adminhtml.xml

<config> 
<menu> 
    <mycustomtab module="colorswitch" translate="title"> 
     <title>My Custom Tab</title> 
     <sort_order>100</sort_order> 
     <children> 
      <index module="colorswitch" translate="title"> 
       <title>Index Action</title> 
       <sort_order>1</sort_order> 
       <action>adminhtml/colorswitch</action> 
      </index> 
      <list module="colorswitch" translate="title"> 
       <title>List Action</title> 
       <sort_order>2</sort_order> 
       <action>adminhtml/custom/list</action> 
      </list> 
     </children> 
    </mycustomtab> 
</menu> 
<acl> 
    <resources> 
     <admin> 
      <children> 
       <custom translate="title" module="colorswitch"> 
        <title>My Controller</title> 
        <sort_order>-100</sort_order> 
        <children> 
         <index translate="title"> 
          <title>Index Action</title> 
          <sort_order>1</sort_order> 
         </index> 
         <list translate="title"> 
          <title>List Action</title> 
          <sort_order>2</sort_order> 
         </list> 
        </children> 
       </custom> 
      </children> 
     </admin> 
    </resources> 
</acl> 

Я нету ни малейшего представления, где проблема.

+0

PLS проверить мой ответ. –

ответ

0

В меню ВПО используется узлу

<config> 
    <menu> 
    <mycustomtab module="colorswitch" translate="title"> 

и ниже

<acl> 
    <resources> 
     <admin> 
      <children> 
       <**custom** translate="title" module="colorswitch"> 

Изменить этот обычай узел для mycustomtab

+0

это сработало для вас? – Shrikant

0

Ваш код:

<acl> 
    <resources> 
    <admin> 
     <children> 
      <custom translate="title" module="colorswitch"> 
       <title>My Controller</title> 
       <sort_order>-100</sort_order> 
       <children> 
        <index translate="title"> 
         <title>Index Action</title> 
         <sort_order>1</sort_order> 
        </index> 
        <list translate="title"> 
         <title>List Action</title> 
         <sort_order>2</sort_order> 
        </list> 
       </children> 
      </custom> 
     </children> 
    </admin> 
    </resources> 
</acl> 

должно быть:

<acl> 
    <resources> 
    <admin> 
     <children> 
      <mycustomtab translate="title" module="colorswitch"> 
       <title>My Controller</title> 
       <sort_order>-100</sort_order> 
       <children> 
        <index translate="title"> 
         <title>Index Action</title> 
         <sort_order>1</sort_order> 
        </index> 
        <list translate="title"> 
         <title>List Action</title> 
         <sort_order>2</sort_order> 
        </list> 
       </children> 
      </mycustomtab> 
     </children> 
    </admin> 
    </resources> 
</acl>