簡體   English   中英

如何在magento的頁面中查看創建的自定義模塊

[英]How to view created custom module in page in magento

我在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>

轉到您的cms頁面,然后單擊“顯示/隱藏編輯器”,然后粘貼以下代碼

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

希望這對您有幫助。

從配置文件中看來,您正在嘗試重寫某些Web服務。 如果您是初學者,則應從創建簡單的“ Hello world”模塊開始。 這是您好世界的資源,它將幫助您開始

http://alanstorm.com/magento_controller_hello_world

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM