我在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>
答案 0 :(得分:3)
转到您的cms页面,然后点击“显示/隐藏编辑器”并粘贴下面的代码
{{block type="core/template" name="hello" template="services/services.phtml"}}
这可以帮助你..
答案 1 :(得分:0)
从您的配置文件看起来您正在尝试重写某些Web服务。 如果您是初学者,那么您应该从创建简单的“Hello world”模块开始。 这是一个帮助你开始的hello world资源