Jestem nowy w Magento i próbuję stworzyć układ dla zbudowanego przeze mnie modułu. Mam prosty moduł i IndexController, który wyświetla "Hello World." (Skorzystałem z samouczka this).Układ dla modułu Magento
Teraz chcę utworzyć układ dla tego modułu i użyłem tego tutorial, ale to nie działa. Czy ktoś może wskazać mi samouczek lub wyjaśnić, jak działają układy w Magento?
Thx :)
Oto co zrobiłem do tej pory: Mam pakiet o nazwie „Andrei” oraz moduł „Hello World”.
Oto config.xml dla mojego modułu:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Andrei_Helloworld>
<version>0.1.0</version>
</Andrei_Helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>Andrei_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
</config>
Oto moduł Andrei_Helloworld:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Andrei_Helloworld>
<active>true</active>
<codePool>local</codePool>
</Andrei_Helloworld>
</modules>
</config>
I tu jest mój kontroler:
class Andrei_Helloworld_IndexController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
echo 'Hello world';
}
}
To wszystko Zrobiłem tak daleko. Moduł działa poprawnie. I chcę układ dla mojego kontrolera IndexController. Thx :)
powinieneś pokazać nam swój kod, głównie plik config.xml, plik układu XML i twoje bloki klasy php. – OSdave
Edytowałem moje pytanie z moim kodem :) – zuzuleinen