php - Magento custom layout local.xml not applying to custom module output pages -
i'm developing both, magento custom module , magento custom theme, i'm facing problems driving me insane!!!(p.s.: magento 1.7.0.2)
my module , theme structure following:
app -local -mynamespace -mypackagename -block -controllers -etc -helper -model -sql design -frontend -default -mycustomtheme -etc -layout -template
my config.xml(placed on mypackagename/etc):
<?xml version="1.0" encoding="utf-8"?> <config> <modules> <namespace_packagename> <version>0.1.0</version> </namespace_packagename> </modules> <frontend> <routers> <namespace_packagename> <use>standard</use> <args> <module>namespace_packagename</module> <frontname>packagename</frontname> </args> </namespace_packagename> </routers> <layout> <updates> <namespace_packagename> <file>mycustomtheme/layout/local.xml</file> </namespace_packagename> </updates> </layout> </frontend> <global> <blocks> <namespace_packagename> <class>namespace_packagename_block</class> </namespace_packagename> </blocks> </global> </config>
i want apply of custom theme skins on custom module page. i.e.: controller, let's call examplecontroller, , exampleaction() action method... changes in page layout, should wrapped tag in local.xml, right? not working!
the point is, accessing url "mysite.com/packagename/example/example" , using layoutviewer module see handles, can see packagename_example_example handle there, i'm not able customize it, because it's not being recognized in local.xml! magento driving me insane, know doing wrong?
thanks lot in advance :)
edit
when put custom template , local.xml file in base directory, works fine!! i'm getting this:
- custom template in base folder, local.xml in custom theme folder - not working
- custom template in custom theme folder, local.xml in custom theme folder - not working
- custom template in base folder, local.xml in base folder - works fine!
- custom template in custom theme folder, local.xml in base folder - not working
someone know possibly cause this? magento not recognizing custom folders, when put them in base directory, magento core located.
you're confusing few concepts here.
first, magento always file named local.xml
in configured theme hierarchy.
design/frontend/default/[current theme]/layout/local.xml design/frontend/default/default/layout/local.xml design/frontend/base/mycustomtheme/layout/local.xml
this module-less layout customizations. don't name file local.xml
, confusing things.
second, when you're specifying custom layout xml file module in config.xml
, path should base of layout folder
<!-- bad --> <file>mycustomtheme/layout/local.xml</file> <!-- --> <file>my-customer-file.xml</file>
you can list of paths xml files magento using finding following line in version of magento
#file: app/code/core/mage/core/model/layout/update.php $filestr = file_get_contents($filename);
and adding debugging code
var_dump($filename); $filestr = file_get_contents($filename);
finally, based on update, doesn't sound you've setup magento use custom theme. make sure theme name set @
system -> configuration -> design -> themes
Comments
Post a Comment