我有一个带有子子类别的magento主菜单下拉列表。
试图达到这个结果:
-Home - Link1 - Link2 - Link3 - Link4
|
|_SubCategory Link
|_SubCategory Child 1
|_SubCategory Child 2
|_**View all Categories within Link1**
我有下拉工作,我还在每个下拉列表的末尾显示“查看所有类别”链接(必须编辑“/ app / code / local / Mage / Page / Block / Html / Topmenu.php“下面带代码的文件”
$html .= '<li ' . $this->_getRenderedMenuItemAttributes($child) . '>';
$html .= '<a href="' . $child->getUrl() . '" ' . $outermostClassCode . '><span>'
. $this->escapeHtml($child->getName()) . '</span></a>';
if ($child->hasChildren()) {
if (!empty($childrenWrapClass)) {
$html .= '<div class="' . $childrenWrapClass . '">';
}
$html .= '<ul class="level' . $childLevel . '">';
$html .= '<div class="categoryText">Categories</div>';
$html .= $this->_getHtml($child, $childrenWrapClass);
$html .= '<a href="' . $child->getUrl() . '" class="viewAllLink"><span>View All</span></a>';
$html .= '</ul>';
}
我希望“查看全部”链接指向包含主类别(Link1)中所有类别的无序列表的页面。目前,“查看全部”链接仅指向主类别页面(其具有带静态块的登录页面),我无法弄清楚如何让它显示我想要的内容。我现在已经找了一会儿。
任何提示?非常感谢!