Кемеровские программисты php общаются здесь
-
Anonymous
Удалить тег привязки из определенной подкатегории в Magento
Сообщение
Anonymous »
Я хочу отключить тег привязки двух подкатегорий. Я использовал бесплатное расширение для верхнего меню. Код меню подкатегорий:
Код: Выделить всё
public function drawMenuItem($children, $level = 1)
{
$html = '';
$keyCurrent = $this->getCurrentCategory()->getId();
foreach ($children as $child) {
if (is_object($child) && $child->getIsActive()) {
// --- class for active category ---
$active = '';
if ($this->isCategoryActive($child)) {
$active = ' actParent';
if ($child->getId() == $keyCurrent) $active = ' act';
}
// --- format category name ---
$name = $this->escapeHtml($child->getName());
if (Mage::getStoreConfig('custom_menu/general/non_breaking_space')) $name = str_replace(' ', ' ', $name);
$html.= '' . $name . '';
$activeChildren = $this->_getActiveChildren($child, $level);
if (count($activeChildren) > 0) {
$html.= '';
$html.= $this->drawMenuItem($activeChildren, $level + 1);
$html.= '';
}
}
}
$html.= '';
return $html;
}
Я пытался отключить две подкатегории. Но это не сработало. Как я могу задать правильное условие для отключения определенных двух подкатегорий?
Подробнее здесь:
https://stackoverflow.com/questions/294 ... in-magento
1728423453
Anonymous
Я хочу отключить тег привязки двух подкатегорий. Я использовал бесплатное расширение для верхнего меню. Код меню подкатегорий:
[code]public function drawMenuItem($children, $level = 1)
{
$html = '';
$keyCurrent = $this->getCurrentCategory()->getId();
foreach ($children as $child) {
if (is_object($child) && $child->getIsActive()) {
// --- class for active category ---
$active = '';
if ($this->isCategoryActive($child)) {
$active = ' actParent';
if ($child->getId() == $keyCurrent) $active = ' act';
}
// --- format category name ---
$name = $this->escapeHtml($child->getName());
if (Mage::getStoreConfig('custom_menu/general/non_breaking_space')) $name = str_replace(' ', ' ', $name);
$html.= '' . $name . '';
$activeChildren = $this->_getActiveChildren($child, $level);
if (count($activeChildren) > 0) {
$html.= '';
$html.= $this->drawMenuItem($activeChildren, $level + 1);
$html.= '';
}
}
}
$html.= '';
return $html;
}
[/code]
Я пытался отключить две подкатегории. Но это не сработало. Как я могу задать правильное условие для отключения определенных двух подкатегорий?
Подробнее здесь: [url]https://stackoverflow.com/questions/29429227/remove-anchor-tag-from-a-particular-subcategory-in-magento[/url]