我有一個類別在我的商店,需要一個完全不同的佈局,以標準的Magento佈局。所以,我創建了1column.phtml的新副本和renaked並做出一個小的變化進行測試:Magento添加新的頁面佈局類別使用
前端/測試/默認/模板/頁/ 1column-lookbook.phtml
<?php
/**
* Template for Mage_Page_Block_Html
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
<head>
<?php echo $this->getChildHtml('head') ?>
</head>
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
<?php echo $this->getChildHtml('after_body_start') ?>
<div class="container">
<?php echo $this->getChildHtml('global_notices') ?>
<div class="page">
<?php echo $this->getChildHtml('header') ?>
<div class="page_content">
<div class="row">
<div class="sixcol">
<?php echo $this->getChildHtml('breadcrumbs') ?>
</div>
<div class="sixcol last">
</div>
</div>
<div class="row"><h3>Filter here</h3></div>
<div class="row"><h3>Scrolling content</h3></div>
<div class="row">
<div class="main-content">
<?php echo $this->getChildHtml('global_messages') ?>
<?php echo $this->getChildHtml('content') ?>
</div>
</div>
<?php echo $this->getChildHtml('footer') ?>
<?php echo $this->getChildHtml('before_body_end') ?>
</div>
</div>
</div>
<?php echo $this->getAbsoluteFooter() ?>
</body>
</html>
但是我似乎無法讓我的目錄看到這個,我試着在page.xml和layout.xml文件中添加對它的引用。但是,不管我嘗試過什麼,我似乎無法讓它顯示int他的頁面佈局下拉爲我的類別。
這兩個都是專門爲CMS頁面,這是否也將添加到類別以及可用? – 2013-03-05 17:19:52
是應該正常工作 – Andrew 2013-03-05 17:23:20