码迷,mamicode.com
首页 > Web开发 > 详细

magento的url中 去掉多余的目录层级

时间:2015-08-03 18:59:39      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:

有时我们需要仅仅显示一层目录的URL路径.而不要出现多个路径的现实,我们可以用以下方法修改:

Edit  /app/code/core/Mage/Catalog/Model/Url.php

找到632行,然后将下面的注释掉

//if (null === $parentPath) {
//$parentPath = $this->getResource()->getCategoryParentPath($category);
//}
//elseif ($parentPath == ‘/‘) {
$parentPath 
‘‘
;
//}

magento的url中 去掉多余的目录层级

标签:

原文地址:http://www.cnblogs.com/focai/p/4699896.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!