Reputation: 915
I've read the tutorials and forum posts on this, but whatever I do it doesn't seem to make any difference.
I'd like to change my search results to a 1column layout. So far I have tried going to
app/design/frontend/base/default/layout/catalogsearch.xml
and changing every instance of
<reference name="root">
<action method="setTemplate"><template>LAYOUT HERE</template></action>
</reference>
to
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
I have disabled my caches, refreshed them, flushed them, I have even reindexed my indexes.
I don't have a catalogsearch.xml in my theme that could be over riding it either.
Any ideas, this is so frustrating.
Upvotes: 1
Views: 3174
Reputation: 11
Used this in local.xml created in the /layout folder in my actual theme to display a search with 2columns-left,
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<catalogsearch_result_index translate="label">
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
</catalogsearch_result_index>
</layout>
Worked perfect in Magento 1.9.0.1
Upvotes: 0
Reputation: 410
To change your layout for search, try using your active(default) template.
Lets assume you're using the default magento layout-
(1) Open app/design/frontend/default/default/layout/catalogsearch.xml
inside
<catalogsearch_result_index translate="label">
make your change to
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
(Or whichever your template is currently set to, inside the root reference)
The reason your current code did not work is because the default(active) template is overriding base. This keeps base safe when comes time for Magento to update.
Edit* If you place your files in the actual default template, they are subject to replacement during an upgrade, along with base. Make sure you have your own template folder, and make your change to local.xml, instead of catalogsearch.xml -
Your local.xml file might look like this if it were brand new-
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<default>
<catalogsearch_result_index translate="label">
<reference name="root">
<action method="setTemplate"><template>page/3columns.phtml</template></action>
</reference>
</catalogsearch_result_index>
</default>
</layout>
Upvotes: 1
Reputation: 37700
Don't change the files in "base" themes. They get overridden by the theme you are actually using. The conventional and recommended way to make changes is by creating a local.xml
file in your custom theme and putting actions in there.
Upvotes: 0