Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to display in 3 columns for each page? 
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

Hello,

I would like to display all the pages of my website in 3 columns like the home page.
How can I do?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Reino
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2008-06-22
Utrecht, The Netherlands
 

You should edit your .xml files in layout folder.
Like catalog.xml:

app/design/frontend/default/YOURTHEME/layout/catalog.xml

Add or change:

<reference name="root">
<
action method="setTemplate"><template>page/3columns.phtml</template></action>
</
reference>
 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

I changed the code catalog.xml and I have now a error message:

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 4: parser error : Opening and ending tag mismatch: head line 3 and action in /home/XXXXXXX/www/app/code/core/Mage/Core/Model/Layout/Update.php on line 293
Trace:
#0 [internal function]: mageCoreErrorHandler(2, ‘simplexml_load_...’, ‘/home/XXXXXXX/www...’, 293, Array)
#1 /home/XXXXXX/www/app/code/core/Mage/Core/Model/Layout/Update.php(293): simplexml_load_string(’???fetchFileLayoutUpdates()
#3 /home/XXXXXX/www/app/code/core/Mage/Core/Model/Layout/Update.php(246): Mage_Core_Model_Layout_Update->fetchPackageLayoutUpdates(’default’)
#4 /home/XXXXXX/www/app/code/core/Mage/Core/Model/Layout/Update.php(224): Mage_Core_Model_Layout_Update->merge(’default’)
#5 /home/XXXXXX/www/app/code/core/Mage/Core/Controller/Varien/Action.php(257): Mage_Core_Model_Layout_Update->load()
#6 /home/XXXXXX/www/app/code/core/Mage/Core/Controller/Varien/Action.php(213): Mage_Core_Controller_Varien_Action->loadLayoutUpdates()
#7 /home/XXXXXX/www/app/code/core/Mage/Cms/Helper/Page.php(74): Mage_Core_Controller_Varien_Action->loadLayout(Array, false, false)
#8 /home/XXXXXX/www/app/code/core/Mage/Cms/controllers/IndexController.php(32): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), ‘home’)
#9 /home/XXXXXX/www/app/code/core/Mage/Core/Controller/Varien/Action.php(367): Mage_Cms_IndexController->indexAction()
#10 /home/XXXXXX/www/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(163): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#11 /home/XXXXXX/www/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home/XXXXXX/www/app/Mage.php(457): Mage_Core_Controller_Varien_Front->dispatch()
#13 /home/XXXXXX/www/index.php(52): Mage::run()
#14 {main}

I replaced:

<!--
Product view
-->

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

to

<!--
Product view
-->

    <
catalog_product_view>
        <!-- 
Mage_Catalog -->
        <
reference name="root">
            <
action method="setTemplate"><template>page/3columns.phtml</template></action>
        </
reference>
        <
reference name="head">
 
Magento Community Magento Community
Magento Community
Magento Community
 
Reino
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2008-06-22
Utrecht, The Netherlands
 

Opening and ending tag mismatch

mmm was that really the only thing you changed?

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

Yes, I only modify this line in this file.

I supposed it’s because I opened it with FRONTPAGE !!!! What do you think?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Reino
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2008-06-22
Utrecht, The Netherlands
 

Is it sarcasm?

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

What do you mean?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Reino
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2008-06-22
Utrecht, The Netherlands
 

Well i don’t get it…
You are sure your xml file is correct (Opening and ending tag mismatch).
Or is it working allready?

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

Forget my problem !!!

I think I found my problem, I made a mistake when I paste in the file catalog.xml

I will solve the problem tonight.

Thank you so much to helped me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

It’s OK everything is OK now, sorry for this problem !!!!

Now I can see the product in 3 columns but there is a problem with the picture of the item is it possible to reduce it, because the text is bottom the picture.
I want the text on the right of the picture.

Please look the picture attached.

Thks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Reino
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2008-06-22
Utrecht, The Netherlands
 

Ok great you succeed with the first problem.

From now on you have to edit the template file of the product page.
You can find the phtml in the following folder:
app/design/frontend/default/YOURTHEME/template/catalog/product/view.phtml

Maybe it’s and idea to turn on the template hints in admin:
System > Configuration > Developper (bottom left menu) > Select your site on left top > Debug > show template hints (turn it on!)
From now on Magento will show some template hints on frontend.

You can also fix this problem with only edit the css file. Use firebug to inspect the css (firebug for firefox, google it).
But i suggest to edit the template to a bit because space got smaller in the 3 column.

Good luck!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

Hello,

I changed my mind, I would like to display product view in 2 right columns with category list on the left column (I don’t want to see CART, NEWSLETTER, ...)

It doesn’t work if I change in the catalog.xml:

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

to

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

How can I do?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Reino
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2008-06-22
Utrecht, The Netherlands
 

Try to change:

<!--
Category default layout
-->

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

Arround line 76, catalog.xml

 
Magento Community Magento Community
Magento Community
Magento Community
 
guillaume7684
Sr. Member
 
Total Posts:  241
Joined:  2008-10-20
 

Hi Reino,

Nothing has changed !!!!

It’s strange.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top