1

I followed the tutorial in http://alanstorm.com/magento_controller_hello_world but I don't know why the link filipeferminiano.com/lojateste/helloworld does't works. Here is my config.xml

<config>    
<modules>
    <ffdotcom_Helloworld>
        <version>0.1.0</version>
    </ffdotcom_Helloworld>
</modules> <frontend>
    <routers>
        <helloworld>
            <use>standard</use>
            <args>
                <module>ffdotcom_Helloworld</module>
                <frontName>helloworld</frontName>
            </args>
        </helloworld>
    </routers>  
</frontend>

Filipe Ferminiano
  • 8,373
  • 25
  • 104
  • 174
  • add your controller file to post – freento Jan 20 '13 at 10:30
  • is this your base link? http://filipeferminiano.com/lojateste/ then your controller must be IndexController.php and action name will be indexAction() and extended class Mage_Core_Controller_Front_Action if this all are right in your code add your sample in post. – Chirag Nandaniya Jan 20 '13 at 10:54
  • 1
    Along with the above two recommendations, please post your module declaration file from *app/etc/modules/* – benmarks Jan 20 '13 at 13:28
  • For those trying to work out if the module is even active, consider the [Module List tool](http://www.magentocommerce.com/magento-connect/module-list.html). – clockworkgeek Jan 20 '13 at 16:54
  • I follow the instructions on http://stackoverflow.com/questions/576908/how-to-create-a-simple-hello-world-module-in-magento and work for me. – Derekthar Jan 31 '13 at 09:56

2 Answers2

2

Create: app/code/local/Ffdotcom/Helloworld/etc/config.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Ffdotcom_Helloworld>
        <version>1.0.0</version>
    </Ffdotcom_Helloworld>    
  </modules>
  <frontend>
    <routers>
        <helloworld>
            <use>standard</use>
            <args>
                <module>Ffdotcom_Helloworld</module>
                <frontName>helloworld</frontName>
            </args>
        </helloworld>
    </routers>  
  </frontend>
 </config>

Create: app/code/local/Ffdotcom/Helloworld/controllers/IndexController.php

<?php
class Ffdotcom_Helloworld_IndexController extends Mage_Core_Controller_Front_Action
{

    public function indexAction(){
        echo 'hello world';
    }

}

Create: app/etc/modules/Ffdotcom_Helloworld.xml

<?xml version="1.0"?>
<config>
   <modules>
       <Ffdotcom_Helloworld>
            <active>true</active>
            <codePool>local</codePool>
       </Ffdotcom_Helloworld>
   </modules>
</config>
MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62
1

The first "f" in your module name must be capitalized in the frontend/routers/helloworld/args xpath.

benmarks
  • 23,384
  • 1
  • 62
  • 84
  • Yes, it is my base link. My IndexController.php is: class Ffdotcom_Helloworld_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { echo 'Hello Index!'; } } I already changed ffdotcom to Ffdotcom in all files, but still not works. – Filipe Ferminiano Jan 20 '13 at 12:05
  • And my module declaration is in a file Ffdotcom_helloworld.xml With the code: true local – Filipe Ferminiano Jan 20 '13 at 14:20