私はマジェントの初心者です。カスタム モジュールを追加し、そのカスタム モジュールのルーティングを行いました。ただし、何も表示されず、空白のページが表示されます!!!! ページが見つからないというメッセージさえありません。ここに私のコードがあります..
私の設定ファイルは次のとおりです app/code/local/Test/Test/etc/config.xml
<config>
<modules>
<Test_Test>
<version>0.7.1</version>
</Test_Test>
</modules>
<frontend>
<routers>
<test>
<use>standard</use>
<args>
<module>Test_Test</module>
<frontName>test</frontName>
</args>
</test>
</routers>
<layout>
<updates>
<test>
<file>test.xml</file>
</test>
</updates>
</layout>
</frontend>
app/etc/modules/Test_Test.xml の私の Test_Test.xml ファイル
<config>
<modules>
<Test_Test>
<active>true</active>
<codePool>local</codePool>
</Test_Test>
</modules>
</config>
app/code/local/Test/Test/controllers/IndexAction.php の私の IndexController.php ファイル
<?php
class Test_Test_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
$this->getLayout();
$this->renderLayout();
}
}
app/design/frontend/default/default/layout/test.xml の私の test.xml ファイル
<layout version="0.7.0">
<test_index_index>
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
</reference>
<reference name="content">
<block type="test/view" name="test_index_view" template="test/view.phtml" />
</reference>
</test_index_index>
</layout>
app/design/frontend/default/default/template/test/view.phtml の私の view.phtml ファイル
<?php
echo "test test test test";
?>
私は次のURLをurl 1と呼びました:
http://localhost:8888/magento/index.php/test/index/index
URL 2:
http://localhost:8888/magento/index.php/test/index
URL 3:
http://localhost:8888/magento/index.php/test
URL 4:
http://localhost:8888/magento/test
その結果、すべて空白のページが表示されます。「404 not found 1」ページも表示されません。問題を引き起こすのを手伝ってください。前もって感謝します..