mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Injecting 'parent' class for menu items with children
--HG-- branch : 1.x
This commit is contained in:
@@ -11,6 +11,9 @@ if (!HasText(Model.Text)) {
|
||||
if ((!string.IsNullOrEmpty(modelUrl) && requestUrl.StartsWith(modelUrl)) || requestUrl == modelUrl) {
|
||||
Model.Classes.Add("current");
|
||||
}
|
||||
if(items.Any()) {
|
||||
Model.Classes.Add("parent");
|
||||
}
|
||||
var tag = Tag(Model, "li");
|
||||
@tag.StartElement
|
||||
<a href="@Model.Href">@Model.Text</a>
|
||||
|
Reference in New Issue
Block a user