Skip to content

Instantly share code, notes, and snippets.

@code-poel
Created April 12, 2013 23:12
Show Gist options
  • Save code-poel/5375932 to your computer and use it in GitHub Desktop.
Save code-poel/5375932 to your computer and use it in GitHub Desktop.
Snippet to add a root node to layout in Magento. This would be placed in local.xml (or page.xml).
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<default>
<reference name="root">
<block type="core/text_list" name="new_root_node" as="new_root_node" translate="label">
<label>New Root Node</label>
</block>
</reference>
<reference name="new_root_node">
<block type="catalog/text" name="some_block" template="page/html/some_template.phtml" />
</reference>
</default>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment