Last active
August 12, 2016 13:11
-
-
Save 0-Sony/c075a17edfb5f26c5082 to your computer and use it in GitHub Desktop.
Create a new custom Layout page Template which will be visible in back office for page cms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- local/Namespace/Module/etc/config.xml --> | |
<config> | |
<global> | |
<page> | |
<layouts> | |
<template_name translate="label" module="Namespace_Module"><!-- Example template_name : homepage --> | |
<label>Template_Label</label><!-- Example : Homepage --> | |
<template>path/template.phtml</template> | |
<layout_handle>handle_name</layout_handle> <!-- Example : namespace_homepage --> | |
</template_name> | |
</layouts> | |
</page> | |
</global> | |
<!-- Here we need to update layout with our custom xml --> | |
<frontend> | |
<layout> | |
<updates> | |
<namespace_module module="Namespace_Module"> | |
<file>namespace_module.xml</file> | |
</Test_Page> | |
</updates> | |
</layout> | |
</frontend> | |
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- design/frontend/your_theme/default/layout/namespace_module.xml --> | |
<handle_name translate="label" module="namespace_module"> | |
<label>Template_Label</label> | |
<!-- Root --> | |
<reference name="root"> | |
<action method="setTemplate"> | |
<template>path/template.phtml</template> | |
</action> | |
<action method="setIsHandle"> | |
<applied>1</applied> | |
</action> | |
</reference> | |
<!-- Do what you need --> | |
</handle_name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment