magento的url中 去掉多餘的目錄層級

有時咱們須要僅僅顯示一層目錄的URL路徑.而不要出現多個路徑的現實,咱們能夠用如下方法修改:php

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

找到632行,而後將下面的註釋掉this

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

相關文章
相關標籤/搜索