Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Created January 21, 2014 18:56
Show Gist options
  • Save xcommerce-gists/8545949 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/8545949 to your computer and use it in GitHub Desktop.
Sample Magento layout file
<?xml version="1.0"?>
<!--
/**
* Magento frontend layout
*
* @author Magento
*/
-->
<layout version="0.1.0">
<default>
<reference name="footer_links">
<action method="addLink" translate="label title" module="magentostudy_news" ifconfig="news/view/enabled">
<label>News</label>
<url>news</url>
<title>News</title>
<prepare>true</prepare>
</action>
</reference>
</default>
<magentostudy_news_index_index translate="label">
<label>News Page</label>
<reference name="root">
<action method="setTemplate">
<template>page/2columns-right.phtml</template>
</action>
<action method="setHeaderTitle" translate="title" module="magentostudy_news">
<title>Site News</title>
</action>
</reference>
<reference name="content">
<block type="magentostudy_news/list" name="news.list" template="magentostudy/news/list.phtml">
<block type="page/html_pager" name="news.list.pager" as="news_list_pager" />
</block>
</reference>
</magentostudy_news_index_index>
<magentostudy_news_index_view translate="label">
<label>News Item Page</label>
<reference name="root">
<action method="setTemplate">
<template>page/2columns-right.phtml</template>
</action>
</reference>
<reference name="content">
<block type="magentostudy_news/item" name="news.item" template="magentostudy/news/item.phtml" />
</reference>
</magentostudy_news_index_view>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment