We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [layout]

Denotes the xml files used to define the block hierarchy which eventually renders the template files.

Filter by
Sorted by
Tagged with
1
vote
2answers
4k views

Add CMS page to topmenu only with XML

In CMS->page->Design->DesignXML I add this: <reference name="top.menu"> <action method="addLink" translate="label title" module="customer"> <label>Home</label> <url><...
3
votes
2answers
2k views

Reference a block in static page

I have a static page in which I call a dynamic block: {{block type="custommodule/search" name="custommodule_search" template="custommodule/search.phtml" }} In the layout file of my custom module I'm ...
6
votes
1answer
1k views

Widget Instance Block Bug

I've noticed that if you create a widget instance, then add a layout update, if you choose to add a widget instance to a single page, say cms_index_index, the next time you edit the widget instance, ...
2
votes
2answers
3k views

Transactional Email Layout Handle Not Working

I've created a custom module with custom transactional email.The layout handle does not work in the email that's being sent, {{layout handle="reviewreminder_order_email" order=$order}} I've also ...
0
votes
2answers
5k views

Free homepage carousel

Can anyone recommend a free extension that allows a carousel to be placed on the hompage with rotating images? The images should be able to be uploaded in the admin area.
1
vote
2answers
5k views

Move page title using local xml

Is it possible to move the page title on cms pages to the left column of a 2 column left layout? But, purely using local.xml and not editing the templates?
2
votes
1answer
939 views

Create A New Layout Block Magento Basket Page

So I want to change a code block (discount vouchers) on the cart page. I need to create a new file to style this block. The existing layout file (XML) has the following code: <checkout_cart_index&...
5
votes
2answers
5k views

Layout Update XML - Update Handle

I'm trying to change the layout handle for specific CMS pages in the back end. To do this I'm trying to use the following in Design->Page Layout->Layout Update XML <update handle="store_page" /&...
1
vote
1answer
2k views

Add Top Links on condition basis in magento

I am little bit stuck with adding top links in my custom phtml. I removed the links block in my XML <remove name="top.links"/>, now after some condition become true, I want to add this block ...
2
votes
3answers
4k views

Best Practice: How to add a column to a backend grid ?

Usually we need to add to the Order Grid some column, so let take this as example. There are 3 ways to do that: Rewrite the grid block in our custom module Use an observer on the event ...
2
votes
3answers
125 views

Putting Layout Files in Module Directory

Can you put module layout files within the Module's code directory in Magento 1.13? This is as opposed to putting them in /app/design/...
2
votes
1answer
4k views

Can i call getMediaUrl method in template file with a default block instance?

In my custom phtml file (say foo/bar.phtml file), i need to call $this->getMediaUrl(some/imagefile), How do i use $this instance with a default block instance(say core/template).
12
votes
4answers
24k views

Pass data to getChildHtml() or call method on child block

I want to be able to pass data to the getChildHtml() call. The reason is, the output of the block is dependant upon a product type. So i want to pass the product to the getChildHtml so that it can ...
0
votes
3answers
3k views

routers and updates node relation in config.xml

I was trying to add a phtml file via update xml for one of my custom module am pasting my config.xml file here <config> <frontend> <routers> <integer> ...
7
votes
4answers
9k views

Move breadcrumb Block purely via local.xml

I want to move the breadcrumb block purely using local.xml. It needs to be moved from its default location to the content block somewhere for me to output. Usually when moving blocks i would ...
13
votes
3answers
9k views

Remove toolbar from product list via local.xml

I am used to using local.xml for my layout updates, however I cant seem to remove the toolbar from the product list block using either the remove or unsetChild methods. Can anyone say if this is ...
13
votes
2answers
11k views

Template path not showing

For some reason the template path hints are not displayed. I went to the admin panel and turned them off and on again, then cleared the cache. But they are still not displaying. How can I debug/...
6
votes
1answer
8k views

Change the order of CSS files. Load module's CSS before theme's CSS

How can I change the order of CSS files to load module's CSS before theme's CSS? Here are some code examples: Theme's CSS file (loaded on all pages) added in theme's local.xml: <default> &...
18
votes
2answers
9k views

Google CDN jQuery with Local Fallback in Magento Layout XML

I've done the following to include jQuery from Google CDN in Magento: <default> <reference name="head"> <block type="core/text" name="google.cdn.jquery"> <...
32
votes
3answers
30k views

Conditionally show/hide blocks in layout XML

How to conditionally add a block (depending on the configuration in the admin panel) in Magento's layout XML? We can check if config is true on actions. In the example below, if sample/config/...
0
votes
1answer
807 views

home.reports.product.compared block in default home page never displays

I'm trying to use the layout XML that is set by default on the CMS Home page of a clean Magento install (See Admin > CMS > Pages > Design tab > Layout Update XML). It inserts three product ...
3
votes
3answers
5k views

dynamically adding layout updates xml files

In an extension i am working on, i have this section in the module's config.xml- <config> <frontend> <layout> <updates> <...
0
votes
2answers
3k views

Change Sort Order

How to change the products sort order from "desc" to "asc" for one particular category? Is it possible with layout xml?
0
votes
1answer
314 views

checkout_cart_configure sidebar is gone

First of all I am not really sure of how is the best way of checking what went wrong when what is on your xml isn't showing on the actual website. Now for my problem, when I navigate to the ...
0
votes
2answers
162 views

I am trying to re-size a container: col-2 registered users.

When landing on http://designozstudio.com/magento/index.php/customer/account/login/ there are 2 buttons: 'login' and 'create account'. The login button is in a block or container and the width is ...
2
votes
3answers
4k views

Best Practices - Changing Column Count

So far I know two ways of changing the column count. Option 1. Hard Coding it: Change: <?php $_columnCount = $this->getColumnCount(); ?> To: <?php $_columnCount = 4 ?> //or ...
1
vote
1answer
457 views

Product Page is Blank pointing to non existant template frontend/base/default/template/page/column.phtml

I am going a little mad trying to figure out why the product page for my site is pointing to frontend/base/default/template/page/column.phtml which does not exist. Any help here will be greatly ...
1
vote
1answer
2k views

getChildHtml - remove specific block after call

I want to output a specific child block at a specific place in a template. I am using: echo $this->getChildHtml('block_name') Obviously this works. However, in the same template there is a ...
3
votes
1answer
1k views

Is there a better way to add layout updates to a category rather than using the “Custom Layout Updates” field?

Here's the issue in a nutshell; I have a module adding custom templates that can be used for CMS Pages or Categories. The layout I'm using has updates in local.xml referencing the layout_handle ...
3
votes
3answers
9k views

How to determine all blocks and child blocks attached to a handle?

Is there a way to determine which blocks are attached to a handle and/or what child-blocks a block have?
4
votes
1answer
717 views

Extension loading frontend layout on admin

I believe this is the case, at least. The problem is with an extension called VehicleFits, (it's also on GitHub). EDIT: Here's a bit more configuration info. Magento EE 1.13, VAF 1.34. Originally, ...
2
votes
1answer
241 views

What purpose does getChildHtml('top') and getChildHtml('bottom') have in wishlist/view?

I undersand getChildHtm() is used for rendering child blocks which are connected in layout xml files, but I can not find any template or block named 'top' or 'bottom'. Also both of them are empty ...
5
votes
1answer
6k views

How to Override Mage_Checkout_Block_Links

What is the proper way to override a method, for example, the Mage_Checkout_Block_Links::addCartLink() method. My goal is to add some HTML before the Mage_Checkout_Block_Links::addCartLink() method. ...
22
votes
4answers
44k views

Best Practices Way to Edit Magento Top-Links

Let's say we want to add a shopping cart icon right before the "My Cart" link on Magento's top links (see top links below). What is the best way to do this? Do something to toplinks.php? Do ...
3
votes
2answers
6k views

Conditionally add CSS file in layout XML (local.xml)

I need to add a CSS file in local.xml based on some custom variables. I have 5 CSS files but each time only one needs to be loaded. I only know how to check if a single variable is set in the config. ...
1
vote
1answer
2k views

Override Magento module layout “before/after”

A third-party module inserts a block into the layout via before="-". Is there a way to insert a block before their block without editing the module's xml?
2
votes
1answer
624 views

add block to Authorize.net payment template

in the app/design/frontend/base/default/template/payment/form/cc.phtml template, around line 76, there is a spot to echo out child html. how do I reference that block to add a child into it? I'm ...
2
votes
1answer
4k views

Changing header.phtml for an extension

What is the best practice for the given situation? I'm creating an extension and following Magento's best practices by creating my layout and templates in base/default but putting them in the module ...
15
votes
3answers
20k views

Magento adding CSS and JS includes to the footer

I'm doing some Yslow optimization of my Magento site and am trying to add the CSS and Js to the footer of the site. At the moment I'm using a head reference tag in the layout XML and using addJs and ...
2
votes
1answer
2k views

How to show Grouped or Bundle Products in my custom template?

I created my own template/skin. Simple products show great but others fail. As far as i know, the following lines in the view.phtml allow me to do this: <?php if ($_product->isSaleable() &&...
5
votes
1answer
18k views

Calling custom .phtml file in footer?

I am having trouble getting a custom .phtml file to output in the footer. Here is the path to the file: beckin/themesettings/socialaccounts.phtml I created an xml file called beckin_themesettings....
0
votes
2answers
804 views

Adding a custom area for blocks in a custom layout

Ok, So I've made a module and use it to manage all the custom layouts on my store. Now I need to just add some blocks to certain pages using the template. I added the following line to my custom ...
1
vote
1answer
1k views

Can't get my module layout to work

I'm just trying to test my module by adding some text to the homepage and I can't seem to get this to work. I'm on Magento 1.7.0.2. Magento is aware of my module, I already checked that. Here is my ...
2
votes
3answers
2k views

Using local.xml, I'm getting “Invalid Nesting” errors

With the aim to simplify a lot of our layout XML, I've moved the pertinent parts of our individual files to one local.xml. Everything works fine. However, in the logs, I see errors like this: ...
14
votes
2answers
32k views

Adding custom layouts for CMS and Category use with custom module trouble

I have a category in my store that requires a totally different layout to the standard Magento layouts. So I created a new copy of the 1column.phtml and renamed it and made one small change to test. ...
2
votes
2answers
888 views

How to target a specific Admin Config section with a layout update

It is relatively easy to target the adminhtml_system_config_edit node with layout updates in a layout.xml file by using: <adminhtml_system_config_edit> <reference name="head"> ...
5
votes
3answers
7k views

How to insert core template into product view page before price?

I am trying to insert my core template file in product view page before price using layout xml. I've tried this. <catalog_product_view> <reference name="content"> <block ...
7
votes
2answers
2k views

Magento Core: identical block name in one handle

I want to change the template with block name "persistent.remember.me", but there are two blocks with that same name under the same handle: app/design/frontend/base/default/layout/persistent.xml <...
1
vote
2answers
2k views

layout - call left column block within main column (in the 1column.phtml template)

I have a category list page which uses the 1column.phtml template. However, when the user navigates to a category where there are no subcategories - and only its products are displayed - I would like ...
3
votes
3answers
1k views

Provide properties to views in Magento

In Zend Framework we provide properties to layouts which are then consumed in the view. An example of this would be: $this->layout = new Zend_Layout(); $this->layout->username = 'John'; $...