xml Magento布局 Posted 2021-05-17
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml Magento布局相关的知识,希望对你有一定的参考价值。
<cms_page translate="label">
<reference name="content">
<remove name="page_content_heading"/>
</reference>
</cms_page>
<block type="core/template" name="page.html.open_graphs" template="page/html/open_graphs.phtml" />
<?php echo $this->getChildHtml('page.html.open_graphs');?>
{{block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"}}
//from a controller action
$this->loadLayout();
$this->renderLayout();
var_dump(Mage::getSingleton('core/layout')->getUpdate()->getHandles());
exit("bailing early at ".__LINE__." in ".__FILE__);
<?php
$cmsPage = Mage::getModel('cms/page')->load('home','identifier');
echo $cmsPage->getContent();
?>
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('your_identifier')->toHtml() ?>
<script type="text/javascript">// <![CDATA[
jQuery('html').css("height","100%");
// ]]></script>
<reference name="head">
<action method="AddJs"><script>name</script></action>
<action method="AddItem"><type>js</type><name>name</name></action>
<action method="AddItem"><type>skin_js</type><name>name</name></action>
<action method="AddCss"><stylesheet>name</style></action>
<!-- this one does not work <action method="AddItem"><type>css</type><name>name</name> -->
<action method="AddItem"><type>skin_css</type><name>name</name>
</reference>
{{block type="cms/block" block_id="footer_links_company"}}
<block type="cms/block" name="page.html.checkout_header">
<action method="setBlockId"><block_id>checkout_header</block_id></action>
</block>
<reference name="root">
<action method="addBodyClass"><classname>homepage</classname></action>
</reference>
以上是关于xml Magento布局的主要内容,如果未能解决你的问题,请参考以下文章
Magento xml布局奇怪的行为
xml 覆盖magento产品视图布局
xml Magento布局
apache_conf Magento:通过事件添加布局xml,在local.xml之前直接添加布局文件
如何使用 Magento 布局 xml 文件中的操作方法
xml magento 1中的自定义CMS页面布局