1

This might be a bit too specific, but I couldn't, for the life of me find where how to do this but it might be pretty simple for a non-magento newbie.

I am using Layered Navigation and Framefish and framefish overrides the catalog list and product view of the webshop products and categories.

So the XML file looks like this:

<?xml version="1.0"?>
<layout version="0.1.0">
  <!-- Overriding Template File -->
  <catalog_product_view>
    <reference name="product.info">
      <action method="setTemplate">
        <template>framefish/catalog/product/view.phtml</template>
      </action>
    </reference>
  </catalog_product_view>
  <catalogsearch_result_index>
    <reference name="search_result_list">
      <action method="setTemplate">
        <template>framefish/catalog/product/list.phtml</template>
      </action>
    </reference>
  </catalogsearch_result_index>
  <catalog_category_default>
    <reference name="product_list">
      <action method="setTemplate">
        <template>framefish/catalog/product/list.phtml</template>
      </action>
    </reference>
  </catalog_category_default>
  <catalog_category_layered>
    <reference name="product_list">
      <action method="setTemplate">
        <template>framefish/catalog/product/list.phtml</template>
      </action>
    </reference>
  </catalog_category_layered>
</layout>

I tried to just call a different .phtml for that layered bit but it doesn't seem to be called. So I assume there must be something added in the controller, but of that I am not sure.

If you click on a brand name for example I ASSUME the xml uses the <catalog_category_layered> - bit and when you click on a normal category I ASSUME it uses <catalog_category_default>

IF that is true, I want to load another .phtml file for the layered bit so that I can modify that page.

I would be grateful if someone could point me in the right direction.

2
  • I am not familiar with this extension, so I can't really comment on it. I assume that you have refreshed your Layout cache? Jun 3, 2015 at 14:28
  • @Mayers Aye refreshed the cache, I don't think it's a specific problem with the extension, im just looking for a way to send a page to a different layout template Jun 9, 2015 at 12:12

1 Answer 1

1

If there are multiple XML rules, each in it's separate module, that do the same thing the last one that is executed will be the one producing the final result. Now, the order is defined by the module loading order. If for example your module is called ABC_LayeredNavUpdate and you also have Framefish_SomeModule and both try to change the template, the latter will be loaded after your module because Magento orders them alfabetically.

Now, happily, you can force your module to load after the Framefish one by using the <depends> tag in the module's XML file:

app/etc/modules/ABC_LayeredNavUpdate.xml

<config>
    <modules>
        <ABC_LayeredNavUpdate>
            <active>true</active>
            <codePool>core</codePool>
            <depends>
                <Framefish_SomeModule />
            </depends>
        </ABC_LayeredNavUpdate>
    </modules>
</config>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.