0

我在 Magento 中创建了新的自定义模块。我想在新创建的页面中查看模块。我尝试在内容部分添加以下代码。但它没有在页面中显示

{{block type=”services/services” name="hello" template=”services/services.phtml” }}

请帮助如何在页面中查看创建的模块。

这是我的 config.xml

<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * @category    services
 * @package     web_services
 * @copyright   Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
-->
<config>
    <global>
        <modules>
                <web_services>
                        <version>0.1.0</version>
                </web_services>
        </modules>
    <blocks>
            <services>
                <rewrite>
         <services>web_services_Block_services</services>
        </rewrite>
            </services>
     </blocks>

        </global>
       <frontend>
                <routers>
                        <services>
                                <use>standard</use>
                                <args>
                                      <module>web_services</module>
                                      <frontName>services</frontName>
                                </args>
                        </services>
                </routers>
        <layout>
            <updates>
                <helloworld>
                      <file>services.xml</file>
                </helloworld>
            </updates>
            </layout>
        </frontend>
</config>
4

2 回答 2

3

转到您的 cms 页面并单击“显示/隐藏编辑器”并粘贴以下代码

{{block type="core/template" name="hello" template="services/services.phtml"}}

愿这能帮助你..

于 2013-09-06T07:13:31.720 回答
0

从您的配置文件看来,您正在尝试重写一些 Web 服务。如果您是初学者,那么您应该从创建简单的“Hello world”模块开始。这是 hello world 的资源,可帮助您开始

http://alanstorm.com/magento_controller_hello_world

于 2013-09-06T08:10:36.250 回答