Reputation: 4553
Just now I installed the two extensions for gallery and news in magento 1.6. I am getting the pages and its working fine. But it doesn’t take the theme that I want to apply. I want to apply the 2column with right layout. But I dont know how to apply this layout. How can I apply the layout for the extension pages? Please help me on this.
Thanks in advance.
Upvotes: 1
Views: 578
Reputation: 166066
First, realize you may nto be able to do this. Depending on how the extensions were authored, they may rely on being in a particular template. Second, if you paid for these extensions, you're entitled to support. Contact their authors and see what sort of help they can give.
What you need to do here is apply a run Layout Update when these pages load. The easiest and best way to start with Layout Updates is to add them to the local.xml
that's part of your theme.
To apply a layout update, you need to know the layout handle for a particular page. The layout handle is a string that looks like this
customer_account_login
The first part of a layout handle is the module name, the second is a controller name, and the third is an action name. If you view the Layout Tab on the Commerce Bug demo site (Disclaimer: Commerce Bug is my commercial debugging extension, mentioned here because I don't know an easier way to describe this), you can see the sorts of handles generated for a particular page.
Once you've found the layout handle for your page, add it to your theme's local.xml
file.
File: app/design/frontend/default/yourtheme/layout/local.xml
<layouts>
<extension_handle_name>
<!-- ... -->
</extension_handle_name>
</layouts>
Next, inside the handle, we'll add a Layout Update XML String that will apply the root phtml
template that you want.
File: app/design/frontend/default/yourtheme/layout/local.xml
<layouts>
<extension_handle_name>
<reference name="root">
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
</reference>
</extension_handle_name>
</layouts>
Again, your extensions frontend code may not have been created in a way that's compatible with the 2columns-right.phtml
template. It's also possible that the extensions have used features in Magento that allow them to "lock" the template in place, which would prevent anyone from changing it.
Good luck!
Upvotes: 3