mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
@@ -28,16 +28,16 @@
|
|||||||
: null;
|
: null;
|
||||||
|
|
||||||
IHtmlString sectionHeaderMarkup;
|
IHtmlString sectionHeaderMarkup;
|
||||||
if (firstLevelMenuItem.RouteValues != null || HasText(firstLevelMenuItem.Url)) {
|
if (firstOfTheSecond != null && firstLevelMenuItem.LinkToFirstChild && (firstOfTheSecond.RouteValues != null || HasText(firstOfTheSecond.Url))) {
|
||||||
sectionHeaderMarkup = HasText(itemId)
|
|
||||||
? Html.Link(sectionHeaderText, (string)firstLevelMenuItem.Href, new { @class = itemClassName, id = itemId })
|
|
||||||
: Html.Link(sectionHeaderText, (string)firstLevelMenuItem.Href, new { @class = itemClassName });
|
|
||||||
}
|
|
||||||
else if (firstOfTheSecond != null && firstLevelMenuItem.LinkToFirstChild && (firstOfTheSecond.RouteValues != null || HasText(firstOfTheSecond.Url))) {
|
|
||||||
sectionHeaderMarkup = HasText(itemId)
|
sectionHeaderMarkup = HasText(itemId)
|
||||||
? Html.Link(sectionHeaderText, (string)firstOfTheSecond.Href, new { @class = itemClassName, id = itemId })
|
? Html.Link(sectionHeaderText, (string)firstOfTheSecond.Href, new { @class = itemClassName, id = itemId })
|
||||||
: Html.Link(sectionHeaderText, (string)firstOfTheSecond.Href, new { @class = itemClassName });
|
: Html.Link(sectionHeaderText, (string)firstOfTheSecond.Href, new { @class = itemClassName });
|
||||||
}
|
}
|
||||||
|
else if (firstLevelMenuItem.RouteValues != null || HasText(firstLevelMenuItem.Url)) {
|
||||||
|
sectionHeaderMarkup = HasText(itemId)
|
||||||
|
? Html.Link(sectionHeaderText, (string)firstLevelMenuItem.Href, new { @class = itemClassName, id = itemId })
|
||||||
|
: Html.Link(sectionHeaderText, (string)firstLevelMenuItem.Href, new { @class = itemClassName });
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
// if the header isn't linked and there are no children there's no reason for this item in the menu other than to look pretty
|
// if the header isn't linked and there are no children there's no reason for this item in the menu other than to look pretty
|
||||||
if (secondLevelMenuItems.Count() == 0) {
|
if (secondLevelMenuItems.Count() == 0) {
|
||||||
|
Reference in New Issue
Block a user