显示自定义模块magento的错误网址

时间:2015-06-16 07:51:01

标签: magento magento-1.9 magento-1.9.1

我创建了一个自定义模块'Measurement'。前端网址为http://urbanior.grapesdigital.com/measurement/

我想在帐户页面的Measurements左侧添加一个链接。所以我在measurement.xml

中添加了这个

measuement.xml

<customer_account>
        <reference name="customer_account_navigation">
            <action method="addLink" translate="label" module="measurement"><name>grapes_measurement</name><path>measurement/</path><label>Measurements</label></action>            
        </reference>
    </customer_account> 

config.xml中

<?xml version="1.0"?>
<config>
  <modules>
    <Grapes_Measurement>
      <version>0.1.0</version>
    </Grapes_Measurement>
  </modules>
  <frontend>
    <routers>
      <measurement>
        <use>standard</use>
          <args>
            <module>Grapes_Measurement</module>
            <frontName>measurement</frontName>
          </args>
      </measurement>
    </routers>
        <layout>
          <updates>
            <measurement>
              <file>measurement.xml</file>
            </measurement>
          </updates>
        </layout>
  </frontend>
  <global>
    <helpers>
      <measurement>
        <class>Grapes_Measurement_Helper</class>
      </measurement>
    </helpers>
    <blocks>
      <measurement>
        <class>Grapes_Measurement_Block</class>
      </measurement>
    </blocks>
    <models>
      <measurement>
        <class>Grapes_Measurement_Model</class>
        <resourceModel>measurement_mysql4</resourceModel>
      </measurement>
      <measurement_mysql4>
        <class>Grapes_Measurement_Model_Mysql4</class>
        <entities>        
              <measurement>
                <table>measurements</table>
              </measurement>
        </entities>
      </measurement_mysql4>
    </models>
    <resources>
      <measurement_setup>
        <setup>
          <module>Grapes_Measurement</module>
        </setup>
        <connection>
          <use>core_setup</use>
        </connection>
      </measurement_setup>
      <measurement_write>
        <connection>
          <use>core_write</use>
        </connection>
      </measurement_write>
      <measurement_read>
        <connection>
          <use>core_read</use>
        </connection>
      </measurement_read>
    </resources>
  </global>
  <admin>
    <routers>
      <measurement>
        <use>admin</use>
        <args>
          <module>Grapes_Measurement</module>
          <frontName>admin_measurement</frontName>
        </args>
      </measurement>
    </routers>
  </admin>
  <adminhtml>
    <menu>
      <measurement module="measurement">
        <title>Measurement</title>
        <sort_order>100</sort_order>
        <children>
          <measurement module="measurement">
            <title>Manage Measurement</title>
            <sort_order>0</sort_order>
            <action>admin_measurement/adminhtml_measurement</action>
          </measurement>
        </children>
      </measurement>
    </menu>
    <acl>
      <resources>
        <all>
          <title>Allow Everything</title>
        </all>
        <admin>
          <children>
            <measurement translate="title" module="measurement">
              <title>Measurement</title>
              <sort_order>1000</sort_order>
              <children>
          <measurement translate="title">
            <title>Manage Measurement</title>
            <sort_order>0</sort_order>
          </measurement>
              </children>
            </measurement>
          </children>
        </admin>
      </resources>
    </acl>
    <layout>
      <updates>
        <measurement>
          <file>measurement.xml</file>
        </measurement>
      </updates>
    </layout>
  </adminhtml>
</config> 

但是当我点击此链接时,它会显示类似http://urbanior.grapesdigital.com/admin_measurement/

的网址

它采用管理路径路径而不是前端路径。我不知道如何解决这个问题。它打开相同的页面,但URL不同。

1 个答案:

答案 0 :(得分:0)

请在config.xml中检查您是否有相同的路线&#34;测量&#34;管理员请删除管理员路线或更改它。