0

マジェント 1.7.0.2

Templates Master によってインストールされた Easy Catalog Images があります。タイトル、RSS リンク、説明などをこのモジュールと以下にリストされている製品の上に表示したいと思います。

したがって、view.phtml を title.ptmhl と view.phtml に分割し、次のレイアウトが必要です。

タイトル.phtml

簡単カタログ画像

view.phtml

私の title.phtml は、次のように catalog/category/title.phtml にあります。

<?php
$_helper    = $this->helper('catalog/output');
$_category  = $this->getCurrentCategory();
$categoryName = $this->htmlEscape($_category->getName());
$_imgHtml   = '';
if ($_imageUrl = $_category->getImageUrl()) {
    $_imgHtml = '<img src="'.$_imageUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" />';
    $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
}?>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
    <div class="page-title category-title">
<?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
    <a href="<?php echo $this->getRssLink() ?>" class="link-feed right" title="<?php echo sprintf($this->__('Subscribe to the %s RSS Feed'), $categoryName) ?>" target="_blank"><?php echo sprintf($this->__('Subscribe to %s RSS Feed'), $categoryName) ?></a>
<?php endif; ?>
<h2><?php echo $_helper->categoryAttribute($_category, $this->htmlEscape($_category->getName()), 'name') ?></h2>
</div>

<?php if($_imgHtml): ?>
    <p><?php echo $_imgHtml?></p>
<?php endif; ?>
<?php if($_description=$_category->getDescription()): ?>
    <p class="category-description std"><?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?></p>
<?php endif; ?>
</div>

view.phtml は、上記のようにクラス 'page-title category-title' のすべてのインスタンスを除外するように変更されています。

次のようにcatalog.xmlでtitle.phtmlを参照してみました

        <reference name="content">
            <block type="catalog/category_title" name="category.title" template="catalog/category/title.phtml">
        <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">

title.phtml が表示されません。

4

0 に答える 0