I make a module for Magento and, as I understand it, the layout is not loaded. In the file \app\code\local\***\Brands\etc\config.xml there is such code:

 http://ipic.su/img/img7/fs/kiss_13kb.1405504585.jpg \app\design\frontend\***\default\layout\brand.xml http://ipic.su/img/img7/fs/kiss_37kb.1405504773.jpg 

But the brand.xml file brand.xml not loaded, and if you make a mistake in it, nothing changes. In the controller I execute such code

 http://ipic.su/img/img7/fs/kiss_16kb.1405504852.jpg 

And I see:

Fatal error: Call to a member function assign () on a non-object in ...

  • Show all etc / config.xml - zhartaunik

1 answer 1

Swears on assign() , because getBlock('brand-list') returns void. we conclude that the brand-list block does not exist or the controller cannot find brand.xml

View config.xml

 <routers> <Netpeak_Brands> <use>standard</use> <args> <module>Netpeak_Brands</module> <frontName>brand</frontName> </args> </Netpeak_Brands> </routers> <layout> <updates> <Netpeak_Brands> <file>brand.xml</file> </Netpeak_Brands> </updates> </layout> 

And put your layout in

 \app\design\frontend\base\default\layout\