mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#18993: Assigning "current" class based on urls too
Work Item: 18993 --HG-- branch : 1.x
This commit is contained in:
@@ -8,7 +8,7 @@ if (!HasText(Model.Text)) {
|
||||
} else {
|
||||
string requestUrl = Request.Path.Replace(Request.ApplicationPath, string.Empty).TrimEnd('/').ToUpperInvariant();
|
||||
string modelUrl = Model.Href.Replace(Request.ApplicationPath, string.Empty).TrimEnd('/').ToUpperInvariant();
|
||||
if (requestUrl == modelUrl) {
|
||||
if (requestUrl == modelUrl || (!string.IsNullOrEmpty(modelUrl) && requestUrl.StartsWith(modelUrl + "/"))) {
|
||||
Model.Classes.Add("current");
|
||||
}
|
||||
if(items.Any()) {
|
||||
|
Reference in New Issue
Block a user