1

I have several stores with different layouts. When I make a search in a store, the result is displayed with the default layout. If I call getStore by AdvancedController, the result is correct but the page has incorrect layout. In the default layout:

<catalogsearch_advanced_result translate="label">
    <label>Advanced Search Result</label>
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
    </reference>
    <reference name="catalogsearch_advanced_result">
        <action method="setColumnCount"><columns>4</columns></action>
    </reference>
</catalogsearch_advanced_result>

while in another store layout:

<catalogsearch_advanced_result translate="label">
    <label>Advanced Search Result</label>
    <!-- Mage_Catalogsearch -->
    <reference name="root">
        <action method="setTemplate"><template>page/3columns.phtml</template></action>
    </reference>
    <reference name="catalogsearch_advanced_result">
        <action method="setColumnCount"><columns>3</columns></action>
    </reference>
</catalogsearch_advanced_result>

The result from each store is always displayed with the default layout.

How I can resolve it?

miroku
  • 176
  • 2
  • 10

1 Answers1

1

The Advanced Search Results layout is controlled through your theme's catalogsearch.xml layout file.

You can either modify that or override it using a local.xml layout file and change the template used for the advanced search results;

<?xml version="1.0" encoding="UTF-8"?>
<layout>

    <!-- Advanced search result -->
    <catalogsearch_advanced_result>

       <reference name="root">
           <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>

    </catalogsearch_advanced_result>    

</layout>

If you are changing the catalogsearch.xml and scratching your head as to why the layout isn't changing in your site then first of all verify that the theme author/other developers haven't already overridden this in local.xml

McNab
  • 6,767
  • 4
  • 35
  • 55