1
votes

I'm having a problem with a custom module. The layout update doesn't work.

Here is the module's config.xml file:

    <?xml version="1.0"?>
<config>
    <modules>
        <Pesach_Categories>
            <version>1.0.0</version>
        </Pesach_Categories>
    </modules>

    <frontend>

        <layout>
             <updates>
                  <categories>
                        <file>footer.xml</file>
                  </categories>
             </updates>
        </layout>

    </frontend>

</config>

Here is the code in the app/design/frontend/default/MyTheme/layout/footer.xml file:

    <?xml version="1.0"?>
<layout version="0.0.1">
    <default>
        <reference name="footer">
            <block type="catalog/navigation" name="catList" template="catalog/categories/cat.phtml"/>
        </reference>
    </default>
</layout>

And here is the code for app/design/frontend/default/MyTheme/template/catalog/categories/cat.phtml:

<?php foreach ($this->getStoreCategories() as $_category): ?>
 <div  class="Cen_Wrapper1">

  <span class="BreadCrumbsred">
  <a href="<?php echo $this->getCategoryUrl($_category) ?>"><?php echo $_category->getName(); ?></a></span><br/>
   <?php $_children = $_category->getChildren(); ?>
   <?php if($_children->count()) : ?>

     <?php foreach($_children as $_child) : ?>
 <a href="<?php echo $this->getCategoryUrl($_child) ?>"> <?php echo $_child->getName(); ?></a>
     <?php endforeach; ?>

   <?php endif; ?>
 </div>
 <?php endforeach ?>

The layout updates seem to be coming in (they show up in CommerceBug page layout XML) but they don't seem to do anything.

Here is the following things that i checked:
The file permissions to the app/design/.../MyTheme/template is rwx r-x r-x
The file permissions to the app/design/.../base/default is rwx r-x r-x

The issue is not limited to the custom module...there is another module (FME_Shop_by_manufacturers) that tries to make layout updates to the head and it also doesn't work.

1
Did you clear the cache? - Max
yes i cleared the cache and disabled all the other cache storage in cache management - pzirkind

1 Answers

2
votes

Try to put your phtml to base/default.

The thing is that you should your template in the same theme what is currently set for you shop. You can check your current theme in

System-Configuration-Design-Theme tab.

UPDATE 1

  1. If module is enabled?
  2. Check magento log file.
  3. Try to install your module on clean magento installation. Perhaps core is corrupted.
  4. Check if some modules doesn't overwrite catalog/navigation

Also try in this way:

<?xml version="1.0"?>
<layout version="0.0.1">
<default>
    <reference name="footer">
        <block type="catalog/navigation" name="catList" output="toHtml" template="catalog/categories/cat.phtml"/>
    </reference>
</default>
</layout>

OR in footer.phtml insert

$this->getChildHtml('catList');