Skip to content

Commit fd1a798

Browse files
Added widget zones to inject own links into megamenu
1 parent f08440d commit fd1a798

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

src/Presentation/SmartStore.Web/Views/Catalog/MegaMenu.cshtml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
<div class="navbar-inner">
4848
<div class="container">
4949
<ul class="nav nav-smart shrinkable" style="margin-right: 0;">
50+
51+
@Html.Widget("megamenu_before_first_item")
52+
5053
@foreach (var node in Model.Root.Children)
5154
{
5255
var item = node.Value;
@@ -62,29 +65,31 @@
6265
<li class='@(GetCssClassForNode(node, itemState))'>
6366
<a href="@itemUrl" @Html.Attr("class", "dropdown-toggle", node.HasChildren) data-target="#">
6467
@item.Text
65-
@if (item.ElementsCount.GetValueOrDefault() > 0)
66-
{
67-
<text> (@(item.ElementsCount))</text>
68-
}
68+
@if (item.ElementsCount.GetValueOrDefault() > 0)
69+
{
70+
<text> (@(item.ElementsCount))</text>
71+
}
72+
73+
@if (node.HasChildren)
74+
{
75+
<i class="fa fa-caret-down chevron"></i>
76+
}
77+
</a>
6978

7079
@if (node.HasChildren)
7180
{
72-
<i class="fa fa-caret-down chevron"></i>
81+
@CreateDrilldownMenu(node.Children, true)
7382
}
74-
</a>
7583

76-
@if (node.HasChildren)
77-
{
78-
@CreateDrilldownMenu(node.Children, true)
79-
}
80-
81-
</li>
84+
</li>
8285
if (node.Next != null)
8386
{
8487
<li class="divider-vertical"></li>
8588
}
8689
}
8790

91+
@Html.Widget("megamenu_after_last_item")
92+
8893
</ul>
8994

9095
<ul class="nav nav-smart shrink-menu pull-right hide">

0 commit comments

Comments
 (0)