I've created an index.phtml page and it work on myWeb.id/brand link. Now I create edit.phtml
on my brand folder but I can't access it on myWeb.id/brand/edit.phtml
. My web says 404 not found. What should I do?
My module :
<?xml version="1.0"?>
<config>
<modules>
<myWeb_Brand>
<active>true</active>
<codePool>local</codePool>
<version>0.1.0</version>
</myWeb_Brand>
</modules>
</config>
my brand.xml :
<?xml version="1.0"?>
<layout version="0.1.0">
<brand_index_index>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="brand/index" name="brand_index" template="brand/index.phtml"/>
</reference>
<reference name="product_list_toolbar">
<action method="setTemplate"><template /></action>
</reference>
</brand_index_index>
</layout>
my local block index.php
<?php
class myWeb_Brand_Block_Index extends Mage_Catalog_Block_Product_List {
}
?>
indexcontroller.php
<?php
class myWeb_Brand_IndexController extends Mage_Core_Controller_Front_Action{
public function IndexAction() {
$this->loadLayout();
$this->getLayout()->getBlock("head")->setTitle($this->__("Brand"));
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
$breadcrumbs->addCrumb("home", array(
"label" => $this->__("Home Page"),
"title" => $this->__("Home Page"),
"link" => Mage::getBaseUrl()
));
$breadcrumbs->addCrumb("brand", array(
"label" => $this->__("Brand"),
"title" => $this->__("Brand")
));
$this->renderLayout();
}
}
Helper :
<?php
class myWeb_Brand_Helper_Data extends Mage_Core_Helper_Abstract
{
}
Config.xml :
<?xml version="1.0"?>
<config>
<modules>
<myWeb_Brand>
<version>0.1.0</version>
</myWeb_Brand>
</modules>
<frontend>
<routers>
<brand>
<use>standard</use>
<args>
<module>myWeb_Brand</module>
<frontName>brand</frontName>
</args>
</brand>
</routers>
<layout>
<updates>
<brand>
<file>brand.xml</file>
</brand>
</updates>
</layout>
</frontend>
<global>
<helpers>
<brand>
<class>myWeb_Brand_Helper</class>
</brand>
</helpers>
<blocks>
<brand>
<class>myWeb_Brand_Block</class>
</brand>
</blocks>
</global>
</config>