XML Load Sequence

For developers, it is important to understand that blocks and layout updates must be loaded in the correct order, in keeping with the rules of precedence and load sequence1 which determine how the page is rendered. Magento supports the following page layout scenarios:


Layout Update Examples

The following blocks types can be manipulated with custom layout instructions. Each action must be specified using the full syntax of the instruction. In the following examples, a simplified notation is used to refer to each action, which corresponds to the full syntax of the instruction. ? Value 1 Value 2 Value N Full Syntax  Simplified Syntax ? someActionName($arg1, $arg2, …


Layout Update Syntax

Custom layout updates can be applied to product category pages, product pages, and CMS page to achieve a variety of results, such as: Create new block. Update existing content. Assign actions to blocks. Remove blocks. Any change made to the layout is applied when the associated entity—which can be either a product, category, or CMS page—becomes active in the frontend …


Standard Block Layout

In the following diagram, the block names that can be used to refer to a block in the layout are black, and the block types, or block class paths, are blue.


Controlling Block Order

To control the order of blocks in an XML layout update, include a “before” or “after” positioning property in the code. To place a block—either before, or after a specific block—replace the hyphen with the block identifier, as shown in the following examples: before=”-” Places the block at the top of the sidebar, before other blocks. after=”-” Places the block …


Placing a Block with a Layout Update

Blocks can be placed in the left or right column of a specific page by making a layout update to the XML code. With a few simple changes to the code, you can position the block in either column, and control its position in relation to other blocks. As you work with the underlying code, you will encounter slightly different …


Layout Updates

Before you begin working with custom layout updates, it is important to understand how the pages of your store are constructed, and the difference between the terms layout and layout update. The term layout1 refers to the visual and structural composition of the page. However, the term layout update2 refers to a specific set of XML instructions that determines how …


Storefront Examples

The column dimensions are determined by style sheet of the theme. Some themes apply a fixed pixel width to the page layout, while others use percentages to make the page respond to the width of the window or device. Most desktop themes have a fixed width for the main column, and all activity takes place within this enclosed area. Depending …


Page Layout

Magento is an object-oriented environment with pages that are assembled from separate components. For some, this approach requires a slightly different way of thinking, because there isn’t a single HTML page that corresponds to any given page. After you understand the basics, you’ll appreciate working in such a flexible and fluid environment! The layout of each page in your store …