Question

I use a template with 3 columns in homepage, in my file right_col.phtml I use "$this->getSkinUrl()" and that returns me the wrong theme: /default/default/ instead of /default/my_second_theme, but it works good in all other pages.

How can I fix this problem to get the good theme??

Thanks a lot.

Was it helpful?

Solution 4

I have used this to solve it :

if (Mage::app()->getStore()->getCode()=='deutsch') { 
      Mage::getDesign()->setTheme('deutsch'); 
 }

It works good now ;)

OTHER TIPS

Also make sure that the asset actually exists (or that you specify an existing path). If an asset is not found in any theme, Magento will always use default/default as the resulting skin path.

Check the CMS page for the home page, go to the Design tab, and make sure that you didn't set the "Custom Theme" to something that is overriding the theme that you want to use.

Check the $argument you are passing and verify that the target file actually exists. getSkinUrl() does more than just generate the proper URL, it also verifies that the file exists. If it doesn’t find the file within the store’s /default/my_second_theme folder, it will revert to /default.

Refer to: http://www.nvncbl.com/2009/10/magento-this-getskinurl-wrong-template/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top