Meta 13 Project Blog
  • Home
  • Links
  • CMS
  • CSS
  • Ecom
  • Email
  • Flash
  • Google
  • HTML
  • Javascript
  • OS
  • PHP
  • SEO
  • SQL
Browse: Home / non-cms page

non-cms page

Magento: Display a Static Block on a Non-CMS page via XML

By Darin on May 14, 2012

To your local.xml file (which you should be using rather than editing individual xml files), add:

<layout>
	<contacts_index_index><!-- the page to be edited, found in its original xml file -->
		<reference name="content"><!-- Structural Block where placing Static Block -->
			<block type="cms/block" name="your_block_identifier">
				<action method="setBlockId"><block_id>your_block_identifier</block_id></action>
			</block>
		</reference>
	</contacts_index_index>
</layout>

If you already have an existing local.xml, you won’t need to include <layout>. If the page you want to edit already has existing changes in local.xml, you only to add the <reference> bit and its contents.

Posted in Code, Ecom, Magento | Tagged Magento, non-cms page, static block | Leave a response

Tags

.htaccess Advanced Custom Fields Bower c5 cms Composer Concrete5 Concrete 5 Cron CSS3 customer account Cycle Cycle2 fancybox FancyBox2 Foundation Genesis Google Fonts Google Maps Google Webfonts Google Web Fonts Gravity Forms Grunt html5 HTML5 Boilerplate iPad iPhone jQuery lightbox Magento Media Queries mobile pdf Plesk PrettyPhoto Responsive SASS SCSS static block Twitter typekit Video waypoints WordPress YouTube

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Recent Comments

  • Bryce on Responsive Email Templates
  • Justin on Mail Server Settings (Microsoft365)
  • Justin on Mail Server Settings (Microsoft365)
  • Bryce on Mail Server Settings (Microsoft365)
  • Justin on Mail Server Settings (Microsoft365)

Authors

  • Aaron Huisinga
  • Bryce
  • Darin
  • Jason
  • Josh
  • Justin
  • Nathan
  • nick
  • Paul

Archives

  • March 2016
  • July 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • September 2014
  • July 2014
  • June 2014
  • May 2014
  • December 2013
  • November 2013

Copyright © 2022 Meta 13 Project Blog. Powered by WordPress and Hybrid.