Note that there are some explanatory texts on larger screens.

plurals
  1. POmagento diplays 2 different modules with different namespaces in same page
    primarykey
    data
    text
    <p>I have created two differents modules Test and First associated to different namespaces : Pfay (Test), Train (First).</p> <p>For some reason this link <code>http://localhost/magento/index.php/first/index/</code> will call the function IndexAction of Test/controllers/indexController.php as well</p> <p>Here are the codes : for Test</p> <pre><code>&lt;?php class Pfay_Test_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this-&gt;loadLayout(); $this-&gt;renderLayout(); } } ?&gt; </code></pre> <p>for First:</p> <pre><code> &lt;?php class Train_First_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this-&gt;loadLayout(); $this-&gt;renderLayout(); // echo "First Index"; } } ?&gt; </code></pre> <p>config.xml (test)</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;Pfay_Test&gt; &lt;version&gt;1.0.0&lt;/version&gt; &lt;/Pfay_Test&gt; &lt;/modules&gt; &lt;frontend&gt; &lt;routers&gt; &lt;routeurfrontend&gt; &lt;use&gt;standard&lt;/use&gt; &lt;args&gt; &lt;module&gt;Pfay_Test&lt;/module&gt; &lt;frontName&gt;test&lt;/frontName&gt; &lt;/args&gt; &lt;/routeurfrontend&gt; &lt;/routers&gt; &lt;layout&gt; &lt;updates&gt; &lt;test&gt; &lt;file&gt;test.xml&lt;/file&gt; &lt;/test&gt; &lt;/updates&gt; &lt;/layout&gt; &lt;/frontend&gt; &lt;global&gt; &lt;blocks&gt; &lt;test&gt; &lt;class&gt;Pfay_Test_Block&lt;/class&gt; &lt;/test&gt; &lt;/blocks&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>config.xml (first)</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;Train_First&gt; &lt;version&gt;1.0.0&lt;/version&gt; &lt;/Train_First&gt; &lt;/modules&gt; &lt;frontend&gt; &lt;routers&gt; &lt;routeurfrontend&gt; &lt;use&gt;standard&lt;/use&gt; &lt;args&gt; &lt;module&gt;Train_First&lt;/module&gt; &lt;frontName&gt;first&lt;/frontName&gt; &lt;/args&gt; &lt;/routeurfrontend&gt; &lt;/routers&gt; &lt;layout&gt; &lt;updates&gt; &lt;first&gt; &lt;file&gt;first.xml&lt;/file&gt; &lt;/first&gt; &lt;/updates&gt; &lt;/layout&gt; &lt;/frontend&gt; &lt;global&gt; &lt;blocks&gt; &lt;first&gt; &lt;class&gt;Train_First_Block&lt;/class&gt; &lt;/first&gt; &lt;/blocks&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>test.xml</p> <pre><code>&lt;layout version="0.1.0"&gt; &lt;default&gt; &lt;reference name="content"&gt; &lt;/reference&gt; &lt;/default&gt; &lt;routeurfrontend_index_index&gt; &lt;reference name="content"&gt; &lt;block type="test/monblock" name="afficher_monbloc" template="test/afficher.phtml" /&gt; &lt;/reference&gt; &lt;/routeurfrontend_index_index&gt; &lt;routeurfrontend_index_mamethode&gt; &lt;reference name="content"&gt; &lt;block type="test/monblock" name="afficher_monbloc" template="test/afficher2.phtml" /&gt; &lt;/reference&gt; &lt;/routeurfrontend_index_mamethode&gt; &lt;/layout&gt; </code></pre> <p>first.xml</p> <pre><code>&lt;layout version="0.1.0"&gt; &lt;default&gt; &lt;reference name="content"&gt; &lt;/reference&gt; &lt;/default&gt; &lt;routeurfrontend_index_index&gt; &lt;reference name="content"&gt; &lt;block type="first/firstblock" name="firstblocindex" template="first/first_afficher.phtml" /&gt; &lt;/reference&gt; &lt;/routeurfrontend_index_index&gt; &lt;routeurfrontend_index_mamethode&gt; &lt;reference name="content"&gt; &lt;block type="first/firstblock" name="firstblocmamethode" template="first/first_afficher.phtml" /&gt; &lt;/reference&gt; &lt;/routeurfrontend_index_mamethode&gt; &lt;/layout&gt; </code></pre> <p>And for some reason <code>http://localhost/magento/index.php/test/index/</code> does not work anymore (404 not found). There are probably some conflicts but I can't find where.</p> <p>You can see here the problems.</p> <p><img src="https://i.stack.imgur.com/l5Kl2.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload