Skip to content

Instantly share code, notes, and snippets.

@cobbman
Created March 5, 2013 17:54
Show Gist options
  • Save cobbman/5092412 to your computer and use it in GitHub Desktop.
Save cobbman/5092412 to your computer and use it in GitHub Desktop.
Magento: Add a layout block into a .phtml file. Display a CMS Block in a phtml file:
<?php echo $this->getChildHtml('block_name_tag'); ?>
<?php
# NOTES:
# replace block_name_tag with the name of the block
# Layout blocks are found under the layout folder. All XML files.
# An example of a block element is:
# <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml"></block>
# note that there are differnt types of blocks.
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment