Magento change default column layout - magento

Ok I've checked everywhere including here and everyone's answers is exactly what I have written down so I have no idea why it's not working.
I cleared Magento's cache besides the configuration..
This is what I have in my local.xml file:
<layout>
<default>
<!-- Remove callouts and rarely used stuff -->
<remove name="right.poll" />
<remove name="right.permanent.callout" />
<remove name="left.permanent.callout" />
<!-- Add the local stylesheet -->
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
</default>
</layout>
I deleted the other css stuff I had written since my only concern is the root reference.
My directories look like:
simplistic
layout
local.xml
template
page
html
footer.phtml
header.phtml
etc (all other layout subthings)
1column.phtml
What exactly am I doing wrong? It's still using the 2 column layout when I'm trying to make it use the 1 column..
EDIT:
For anyone curious on the page, here is the page:
http://magento.neofill.com/magento/
You would think after editing local.xml in the default, that would affect all pages right? I don't get what I'm doing wrong. I keep searching and everything is exactly the way I have it. It should be working but if you view the source code, you'll see that it's using the 2 column layout here:
<div class="main-container col2-right-layout">

Related

How do I add a new block to my layout in magento 1.9?

I have a beginner question on layouts ...After reading a lot about layouts, i am more confused than where i started. I want to add a banner block that will be displayed on my home page and a few other pages. I decided that it cannot be a part of the header.
I want to add this right below the header. I am trying to create my layout via bootstrap. I see in some themes that this is done inside the cms.xml file and i am not sure why i need to edit that. Clearly, i am confused..
Any help would be appreciated.
Go to your theme
app/design/frontend/Your-Package/Your-Theme/layout/local.xml
add below code:
<?xml version="1.0"?>
<layout version="0.1.0">
<cms_index_index>
<reference name="content">
<block type="core/template" name="banner" before="-" template="banner/banner.phtml" />
</reference>
</cms_index_index>
</layout>
add banner.phtml file to
app/design/frontend/Your-Package/Your-Theme/template/banner/banner.phtml
add your banner in above file
To add a block to any other page replace <cms_index_index> with <routname_controllername_actionname> For example, <catalog_product_view>.

Add custom header for Checkout pages in Magento (1.8.x)

I am trying to add a customised header to my Checkout pages, I have figured out removing the header from the page is basically adding a node in the /layout/checkout.xml file, could anyone explain how to basically a new altered header that only applies to all the Checkout pages.
Current default/layout/checkout.xml
<default>
<remove name="footer"> <!-- removes the footer from checkout -->
... // all other xml data..
</default>
pseudocode for my theme
if (a CHECKOUT PAGE) {
use 'custom checkout header'
else
use the standard default header.
In your local.xml file add the below code to add a custom header to the checkout page
<checkout_onepage_index>
<reference name="root">
<block type="page/html_header" name="header" as="header" template="page/html/your_new_header_file_name.phtml"/>
</reference>
</checkout_onepage_index>
Now create a new_header.phtml in app/design/frontend/default/default/template/page/html and add the custom header contents in this file. Now update your new header file name in the above template field.
You can replace default/default with your_package_name/your_theme_name
You will have to add something like
<?php echo $this->getChildHtml('new_header') ?>
in your page template files (1column.phtml, 2columns-left.phtml, etc)
Also try changing
<reference name="root">
to
<reference name="head">
if it is still not working.

How do I add the recently viewed products box to the homepage?

It is a totally easy problem, but Im not able to solve it.
I tried the following:
add layout xml to the update layout field in the backend for this cms page:
<reference name="right">
<block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
</reference>
or the same in the local.xml
<cms_index_index>
<reference name="right">
<block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
</reference>
</cms_index_index>
Thanks a lot, I know its not complicated, but I cant get it.
Here is some checks:
Check if your page is using two-column-right or three-column layout.
Clearing cache
Add your layout update to cms.xml directly and clearing cache.
Hope this help
You might have missed to echo the block in the custom home page template file?
echo $this->getChildHtml('right.reports.product.viewed');
Or may be your home page is using 2-template left or other templates where there is no 'right' content block.

Magento - changes to template file not showing up - /customer/form/register.phml

I'm making some changes to /customer/form/register.phml but they are not showing up in the frontend. Changes that I made to login.phtml and forgotpassword.phtml do show up.
I checked if magento was using a fallback from the base/default theme but it's not. I deleted register.phtml in both my theme and in the base/default theme to check what would happen: the page showed up just fine (without the changes of course).
I looks like magento gets the file from somewhere else (maybe the core). I've got no idea on how to solve this.
Thanks in advance for your help.
My Customer.xml file looks like this, I'm using magento 1.5.1
<customer_account_create translate="label">
<label>Customer Account Registration Form</label>
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
<block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
<label>Form Fields Before</label>
</block>
</block>
</reference>
</customer_account_create>
The best way to debug this - is to turn on template path hints.
You probably need to edit template/persistent/customer/form/register.phtml.
Yes i agree with WebFlake turn on template hints that will let you know which template file the form is being pulled from, most likely you are modifying the wrong template.
Here is a link which explains how to turn on template hints: http://vimeo.com/1067069
Use the template hints. Also, with any phtml changes you make, make sure that you have caching disabled, and flush all caches (System -> Cache Management).
I used template hints and discovered a plugin replaced the file. Enabling template hints: http://vimeo.com/1067069 helped a lot

Magento custom theme template file not used 1.6

I have a custom magento template which im trying to tweak and just have a question regarding templates.
Currently the customer login uses the base .phtml file.
So I have created the customer/form/login.phtml file and placed it in my CUSTOM theme folder.
Then in my custom theme folder I went into layouts and and customer.xml. This is where in not sure what I need to do.
I found the following XML code:
<customer_account_login translate="label">
<label>Customer Account Login Form</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>
</reference>
</customer_account_login>
Im not sure what I need to change with this to make it use my custom login form instead of using the base login form.
At first I thought the system would automatically check to see if the file exists in custom and just apply and if it doesnt exist fall back on base template but that didnt seen to work.
Any help would be appreciated. A noob explanation would also be great!
Thanks for reading
Magento seems to use a login file from:
template/persistent/checkout/onepage/login.phtml
In version 1.6 of Magento.
Edited that and the changes appeared as expected. Sorry but i also just found this post
In Magento 1.6, changes to login.phtml don’t reflect
Mine seems to be a dupe (sorry I didnt come across it when searching before) so feel free to close this one :)

Resources