3

I am a little confused with the Magento RWD Knowledge base documentation. I am reviewing the http://www.magentocommerce.com/knowledge-base/entry/ee114-ce19-rwd-dev-guide

Under SASS Fallback Structure it appears to have conflicting information.

Item 2. states that it assumes that you copied all of the SCSS files in your custom theme location and it tells you to remove all of the SCSS Files located in directories copied.

then in

Item 4. it tells you to copy all the files you want to modify in the directory.

So is step 2 necessary?

Also the documentation showcases local.xml file but reading additional documentation it states that local.xml has been replaced with theme.xml in 1.9 RWD but looking through the structure a lot of the overrides are happening in Page.xml

So I am really confused to does 1.9 RWD have a "Local.xml" file? if not which file need to reflect the updates Page.xml or theme.xml?

2

It can be a little confusing. Here is my attempt at giving you an example of how it can be done.

Create a new theme by creating new folder in: app/design/frontend/rwd/mythemename

Magento uses inheritance when loading theme files. So you really don't need to copy all the files from rwd/default to your new theme folder. You only really need to copy the files from rwd/default that you wish to override or modify with new changes.

The basic files you need in rwd/mythemename to get started are:

  • rwd/mythemename/etc/theme.xml
  • rwd/mythemename/template folder with copied files from rwd/default that you wish to modify.

In rwd/mythemename/etc/theme.xml you can further override the layout xmls from the rwd/default/layout folder by structuring your mythemename/etc/theme.xml to look something like this:

<?xml version="1.0"?>
<theme>
    <parent>rwd/enterprise</parent>
    <layout>
        <updates>
            <mythemename_general>
                <file>mythemename/general.xml</file>
            </mythemename_general>
            <mythemename_catalog>
                <file>mythemename/catalog.xml</file>
            </mythemename_catalog>
        </updates>
    </layout>
</theme>

You then can add overide files to a new folder you create in: app/design/frontend/rwd/mythemename/layout/mythemename/general.xml app/design/frontend/rwd/mythemename/layout/mythemename/catalog.xml

These overrides are a more structured approach then using a local.xml and allow you to organize your layout updates more efficiently.

I hope I didn't confuse you more :)

  • Yes, this gives me more clarity. It was just the way the documentation is written because in the beginning steps it tells you to copy the entire directory, then remove everything but a few files but then copy the file you wish to modify back into the directory. Do you happen to know the significance of the Page.xml file? It has the JS files and appears to have also the header structure. I saw that in older documentation that the JS was can be added by the Local.xml but which I assume the Theme.xml has replaced. – dmcs14db Jul 12 '14 at 22:58
  • page.xml is just a way to organize layout updates. See gist.github.com/tegansnyder/7df70109fe7b7bc432a7 – Tegan Snyder Jul 14 '14 at 0:38
1

Thank you for pointing this out. I rearranged the steps to make it more clear that the object is not to copy files and delete them but rather to end up with only the partials you want to edit in your custom theme.

If you followed our instrux to create the custompackage/customtheme directories, you'll have to delete the partials then add back the ones you want to override. Or you can simply add only the ones you want to override.

We appreciate your feedback

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.