adding a magento page to the catalog
I want to add another page in the magento module like the following...
<catalog_wizard_default translate="label">
<reference name="content">
<block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/>
<block type="catalog/category_view" name="category开发者_JAVA技巧.products" template="catalog/category/view.phtml"/>
</reference>
</catalog_wizard_default>
so when customer types in the url, they can do it like so
domain.com/catalog/wizard. I have no idea how to do this. I tried adding another action in the catalog controller like the following
public function wizardAction(){
$this->renderLayout();
}
But this doesnt seem to work.
This should work. I think you need to call $this->loadLayout() before you render the layout...
Generally, a layout handle of catalog_wizard_default
will translate into the following Module-Controller-Action path: Mage_Catalog
- WizardController
- defaultAction()
.
I would suggest that you need to follow these instructions to copy CategoryController
to app/code/local/Mage/Catalog/controllers
and add an action called wizardAction(). Your layout will then be called <catalog_category_wizard>
.
Unfortunately overriding/extended core controllers is quite complicated in Magento, so make sure you follow the wiki instructions carefully.
Hope this helps. JD
精彩评论