views:

25

answers:

2

I'm trying to use Magento for my shopping cart and want to switch from a right col layout to left col. I've turned on ID/CLASS display on the Web Developer Toolbar in firefox, and am seeing ".main col2-right-layout", which i believe i must switch to ".main col2-left-layout", the alternate style is predefined. but running searches for files with the phrase "col2-right-layout" in them is only pulling up the style sheet. I am searching THE ENTIRE Magento directory. How is this possible? Not case sensitive, and I'm even searching hidden folders. How can it be?

**i have looked in that file, the div is not mentioned. **

A: 

Files are in app/layout/default/default/templates/page/

I've not got a dev copy of magento at home, thats all I can remember off the top of my head - will try and remember to confirm when at work.

If you want to swap the templates, you need to look in app/layout/default/default/layout/page.xml, plus some of the other xml files - the templates are defined there.

(Yes, magento's layout/templating system is complicated, and has a steep learning curve, but its worth it!)

benlumley
A: 

col2-right-layout is mentioned in

app/design/frontend/base/default/template/page/2columns-right.phtml

or in Magento 1.3

app/design/frontend/default/default/template/page/2columns-right.phtml

If you want to swap the layout I'd suggest changing it in one of the layout xml files. For the shopping cart edit app/design/frontend/base/default/layout/checkout.xml

change

<checkout_cart_index translate="label">
    <label>Shopping Cart</label>
    <remove name="right"/>
    <remove name="left"/>
    <!-- Mage_Checkout -->
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>

to

<checkout_cart_index translate="label">
    <label>Shopping Cart</label>
    <remove name="right"/>
    <remove name="left"/>
    <!-- Mage_Checkout -->
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>

And similarly for the checkout page in the same file change

<checkout_onepage_index translate="label">
    <label>One Page Checkout</label>
    <!-- Mage_Checkout -->
    <remove name="left"/>

    <reference name="root">
        <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
    </reference>

to

<checkout_onepage_index translate="label">
    <label>One Page Checkout</label>
    <!-- Mage_Checkout -->
    <remove name="left"/>

    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>

As always it is better to make a copy of the file you are editing to your own theme.

Fooman