0

I've followed the instructions here for setting up a child theme. http://alanstorm.com/magento_parent_child_themes

The problem is that even when I set my theme's XML it doesn't fall back to rwd. In fact I don't even think my theme is loading at all.

I created the following:

/app/design/frontend/carl/default/etc/theme.xml

I then changed the package from the default 'rwd' to 'carl'

These give me a homepage with no style at all. So I created a theme.xml containing:

<?xml version="1.0"?>
<theme>
<parent>rwd/default</parent>
</theme>

I reloaded my front page, but still it has no style at all. The correct behaviour should be to fall back to the rwd theme.

All cache is disabled, but I've still flushed it anyway.

On loading the homepage there is no reference to my theme at all.

  • did u changed any settings from backed for theme – Pradeep Sanku Jun 25 '14 at 18:53
  • This was on a stock shop from a fresh install. I've installed a Zurb Foundation 5 starter theme now, so it's largely acedemic, but I would to find out why it didn't work in the fist instance. – C-M Jun 26 '14 at 10:59
2

The reason why is that Magento is looking only at your current theme and not really pulling from the parent. In order to do so you have to apply updates like so

parent theme

<?xml version="1.0"?>
<theme>
    <parent>rwd/default</parent>
    <layout>
        <updates>
            <wsu_base>
                <file>wsu_base_defaults.xml</file>
            </wsu_base>
        </updates>
    </layout>
</theme>

Child theme

<?xml version="1.0"?>
<theme>
    <parent>wsu_base/default</parent>
    <layout>
        <updates>
            <wsu_base>
                <file>wsu_base_defaults.xml</file>
            </wsu_base>
            <foundation_default>
                <file>defaults.xml</file>
            </foundation_default>
        </updates>
    </layout>
</theme>

You can read more on this from http://alanstorm.com/magento_infinite_fallback_theme_xml. Note that I have found that the css of the child is still getting skipped and have a question in on that.

0

To find out if your theme is loading at all you may copy styles.css from /skin/frontend/rwd/default/css to skin/frontend/carl/default/css. Then load your page with firebug or another dev tool. Then confirm that styles.css is loading from the carl/default/css folder.

The magento documentation has a walk through creating a child of rwd theme. Give extra attention to the troubleshooting section.

Another cause for the error may be that if anything is placed before the <?xml version="1.0"?> in theme.xml, the parent will not load. Even a <!-- comment tag--> will cause failure.(it doesn't look like you did this but it may help someone else)

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.