这个标题来自哪里?

时间:2015-02-03 23:46:15

标签: php magento

我正在使用magento,我在left_nav.phtml

中有这个代码
<?php $_helper = Mage::helper('catalog/category');?>      
<?php $_categories = $_helper->getStoreCategories();?>

<!-- BEGIN SIDE-NAV-CATEGORY -->  
<div class="side-nav-categories">
<div class="block-title">
<?php echo ('Categories');?>
<?php   var_dump(get_class($this)); ?>
</div><!--block-title-->
<?php if (count($_categories) > 0):  ?>
<!-- BEGIN BOX-CATEGORY -->  
<div class="box-content box-category">
<ul>
<!-- Subcategory -->
<?php 
//get the current category
$_cat = new Mage_Catalog_Block_Navigation();
$currentCat = $_cat->getCurrentCategory();

//get the children of the current category
$subCats =    Mage::getModel('catalog/category')->load($currentCat->getId())->getChildren()    ;

//get sub category ids
$subCatIds = explode(',',$subCats);
?>

<?php if (count($subCatIds) > 1): ?>
 <ul>
  <?php foreach($subCatIds as $subCatId): ?>
   <?php $subCat = Mage::getModel('catalog/category')->load($subCatId);     ?>
   <?php if($subCat->getIsActive()): ?>
    <li>
     <?php //display category image
     if($subCat->getImageUrl()): ?>
      <img src="<?php echo $subCat->getImageUrl(); ?>" />
     <?php endif; ?>
     <a href="<?php echo $subCat->getUrl(); ?>">
     <?php echo $subCat->getName(); ?>
     </a>
    </li>
   <?php endif; ?>
  <?php endforeach; ?>
 </ul>
<?php endif; ?>
<!-- Subcategory-->
 </ul>
</div><!--box-content box-category-->
<?php endif; ?>
</div><!--side-nav-categories-->
在div类块标题中,它将标题更改为按类别搜索车辆。

在哪里可以找到定义块标题的代码?所以我可以将标题更改为根类别名称?

0 个答案:

没有答案