Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
Page 1 of 4
add a new layout template for CMS Page
 
chinesedream
Mentor
 
Avatar
Total Posts:  1141
Joined:  2007-08-31
 

I want to add a new template, e.g 4columns for CMS page. I have the template setup, but I can’t find where to add my template in the admin so that I can use it from CMS page Layout option.

Thanks!

 Signature 

Accessible, WCAG 2.0 HTML5 Magento themes:
Latest release :  Green Path Premium Theme | : Touchscreen Optimized Mobile Theme

 
Magento Community Magento Community
Magento Community
Magento Community
 
chinesedream
Mentor
 
Avatar
Total Posts:  1141
Joined:  2007-08-31
 

Never mind!

After some madness searching through drawers, I finally found it. I am attaching a screenshot, hope that it’s a little piece of userful information to others.

Image Attachments
addCMSlayout.pngconfigfile.gif
 Signature 

Accessible, WCAG 2.0 HTML5 Magento themes:
Latest release :  Green Path Premium Theme | : Touchscreen Optimized Mobile Theme

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hadifarnoud
Sr. Member
 
Total Posts:  154
Joined:  2007-10-07
Guildford, Surrey, UK
 

Thanks chinesedream,Really good trick

 Signature 

VIP Managed Hosting & Magento Development | Acamedium LLP

 
Magento Community Magento Community
Magento Community
Magento Community
 
GregC
Member
 
Avatar
Total Posts:  67
Joined:  2007-11-23
A^2, MI
 

Any way of doing this without modifying a “core” piece of code?  I don’t want to lose my new layouts when new versions of magento roll out.

Thanks,

GregC

 Signature 

Check out mage-page.net for links to Magento blogs and current articles from around the web

 
Magento Community Magento Community
Magento Community
Magento Community
 
chinesedream
Mentor
 
Avatar
Total Posts:  1141
Joined:  2007-08-31
 

Hi GregC, I don’t know other method.
I’d love to find out if there is easier way too as I kept forgotten how to add the new layouts - have to come back look for my post smile

 Signature 

Accessible, WCAG 2.0 HTML5 Magento themes:
Latest release :  Green Path Premium Theme | : Touchscreen Optimized Mobile Theme

 
Magento Community Magento Community
Magento Community
Magento Community
 
betabomber
Member
 
Avatar
Total Posts:  37
Joined:  2008-02-22
 

This didn’t seem to work for me. The option is still not available in the menu to chose which layout I want.

This is the new code I added:

<cms>
            <
layouts>
                <empty>
                    <
label>Empty</label>
                    <
template>page/one-column.phtml</template>
                </empty>
                <
one_column>
                    <
label>1 column</label>
                    <
template>page/1column.phtml</template>
                </
one_column>
                <
two_columns_left>
                    <
label>2 columns with left bar</label>
                    <
template>page/2columns-left.phtml</template>
                </
two_columns_left>
                <
two_columns_right>
                    <
label>2 columns with right bar</label>
                    <
template>page/2columns-right.phtml</template>
                </
two_columns_right>
                <
three_columns>
                    <
label>3 columns</label>
                    <
template>page/3columns.phtml</template>
                </
three_columns>
------------>   <
redirect>
------------>       <
label>Status Check Redirect</label>
------------>       <
template>page/status-check-redirect.phtml</template>
------------>   </
redirect>
            </
layouts>
        </
cms>

Did I do something wrong?

 
Magento Community Magento Community
Magento Community
Magento Community
 
betabomber
Member
 
Avatar
Total Posts:  37
Joined:  2008-02-22
 

Never mind, I figured it out. Had to clear the cache.

 
Magento Community Magento Community
Magento Community
Magento Community
 
stereotomy
Jr. Member
 
Total Posts:  28
Joined:  2008-02-10
 

varien changed the layout desc file with 1.0

it’s now in app/code/core/Mage/Cms/etc/config.xml

add a new layout under <layouts> and voila! there is your new custom layout!

 
Magento Community Magento Community
Magento Community
Magento Community
 
B00MER
Sr. Member
 
Avatar
Total Posts:  128
Joined:  2007-12-27
DFW, TX
 

Nice thread… defiantly helped me out!

 Signature 

Molotov.bliss / Mb™
└► Magento Commerce
└► Hire Me

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-05-06
 

I think Magento should give a way for manage yours layout templates for the CMS.

Mostly because it´s important when you design a whole and own package or theme.

 
Magento Community Magento Community
Magento Community
Magento Community
 
janoschii
Jr. Member
 
Avatar
Total Posts:  19
Joined:  2008-01-18
 

I didn’t understand why its not on top of the list.
I was searching a lot of time, cause i couldn’t believe its so
hard to find. At least i was taking a text search too.
At the moment you can only change the content of the given templates.
And you cant change the title of the templates.
beside you modify: app/code/core/Mage/CMs/etc/config.xml
With the next update I have to remember and to edit again.
To have a possibility to edit the layout selection in: app/design
would be little work and lot of advantage.
A possibility to manage it in the CMS would be the best.

Jan

 
Magento Community Magento Community
Magento Community
Magento Community
 
doctorlogos
Sr. Member
 
Avatar
Total Posts:  178
Joined:  2008-05-06
 

Hi everyone,

I didn´t stop studing Magento and about this topic I realised that is not so important.

With the four layouts called in config.xml, I have all I need. Because, why I need a 4 columns o 5 columns layout?

I feel confortable with the preset layouts.

 
Magento Community Magento Community
Magento Community
Magento Community
 
infield
Sr. Member
 
Total Posts:  89
Joined:  2007-11-04
San Francisco
 

If I add a new layout to config.xml when I upgrade it will be overwritten.
Will the pages that use the added layout no longer work? Or will you just not be able to assign the layout to any more pages until it is added back to config.xml?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Unirgy
Guru
 
Avatar
Total Posts:  479
Joined:  2007-09-07
 

@infield: add them to local.xml or as a new file in app/etc/modules/

 
Magento Community Magento Community
Magento Community
Magento Community
 
infield
Sr. Member
 
Total Posts:  89
Joined:  2007-11-04
San Francisco
 

I read that by putting modified code in a local menu you could avoid upgrade problems.

I tried this but it didn’t work.

Left the original alone
//home/staging/public_html/app/code/core/Mage/Cms/etc/config.xml

placed the file with the new layout here:
//home/staging/public_html/app/code/local/Mage/Cms/etc/config.xml

 
Magento Community Magento Community
Magento Community
Magento Community
 
infield
Sr. Member
 
Total Posts:  89
Joined:  2007-11-04
San Francisco
 

@Saharian

Add just the <cms> blcok to the within te global tag in //home/staging/public_html/app/etc/local.xml ?

like this?

<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * @category   Mage
 * @package    Mage_Core
 * @copyright  Copyright (c) 2004-2007 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
-->
<
config>
    <global>
        <
install>
            <
date><![CDATA[Tue15 Jul 2008 00:27:06 +0000]]></date>
        </
install>
        <
crypt>
            <
key><![CDATA[cool!sets]]></key>
        </
crypt>
        <
disable_local_modules>false</disable_local_modules>
        <
resources>
            <
db>
                <
table_prefix><![CDATA[]]></table_prefix>
            </
db>
            <
default_setup>
                <
connection>
                    <
host><![CDATA[localhost]]></host>
                    <
username><![CDATA[staging_magento]]></username>
                    <
password><![CDATA[mag2341]]></password>
                    <
dbname><![CDATA[staging_magento]]></dbname>
                    <
active>1</active>
                </
connection>
            </
default_setup>
         </
resources>
         <
cms>
            <
layouts>
                <empty>
                    <
label>Empty</label>
                    <
template>page/one-column.phtml</template>
                </empty>
                <
one_column>
                    <
label>1 column</label>
                    <
template>page/1column.phtml</template>
                </
one_column>
                <
one_column_home>
                    <
label>1 column home</label>
                    <
template>page/1column-home.phtml</template>
                </
one_column_home>
                <
two_columns_left>
                    <
label>2 columns with left bar</label>
                    <
template>page/2columns-left.phtml</template>
                </
two_columns_left>
                <
two_columns_right>
                    <
label>2 columns with right bar</label>
                    <
template>page/2columns-right.phtml</template>
                </
two_columns_right>
                <
three_columns>
                    <
label>3 columns</label>
                    <
template>page/3columns.phtml</template>
                </
three_columns>
            </
layouts>
        </
cms>
     </global>
</
config>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 4
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
701238 users|638 users currently online|497077 forum posts