Cannot create custom module in Magento

St.Kolya

New Member
I'm pretty new to Magento and I've started learning to develop custom modules for the frontend. I've followed several guides and for some reason, none of them are working. It seems as though loadLayout and renderLayout are causing problems. I'm not sure if this is because I have a file in the wrong location, or what the problem is. I've tried loading the pages magento.x/helloworld magento.x/helloworld/index magento.x/index.php/helloworld. I'm getting a broken version of the default site. If I replace the lLayout and rLayout with an echo it works just fine. This is what I have:app/code/local/Wrapids/Helloworld/etc/config.xml\[code\]<config><modules> <Wrapids_Helloworld> <version>0.1.0</version> </Wrapids_Helloworld></modules><frontend> <routers> <helloworld> <use>standard</use> <args> <module>Wrapids_Helloworld</module> <frontName>helloworld</frontName> </args> </helloworld> </routers> <layout> <updates> <helloworld> <file>helloworld.xml</file> </helloworld> </updates> </layout></frontend></config>\[/code\]app/code/local/Wrapids/Helloworld/controllers/IndexController.php\[code\]<?php class Wrapids_Helloworld_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->renderLayout(); } }?>\[/code\]/app/design/frontend/default/default/template/helloworld/page.phtml\[code\]text\[/code\]app/design/frontend/default/default/layout/helloworld.xml\[code\]<?xml version="1.0" encoding="UTF-8"?><layout version="0.1.0"> <default> <reference name="content"> <block type="helloworld/helloworld" name="hello" template="helloworld/page.phtml"> </reference> </default></layout>\[/code\]app/code/local/Wrapids/Helloworld/Block/Helloworld.php\[code\]<?php class Wrapids_Helloworld_Block_Helloworld extends Mage_Core_Block_Template { }?>\[/code\]
bcMSv.png
 
Back
Top