public virtual void FillMissingAttributes() { if (string.IsNullOrEmpty(RouteValues) && !string.IsNullOrEmpty(Caption)) { RouteValues = Caption.ToFormattedID(); } }
public virtual void FillMissingAttributes() { if (string.IsNullOrEmpty(RouteValues) && !string.IsNullOrEmpty(Caption)) { RouteValues = Caption.ToFormattedID(); } if (InnerContent == null || !InnerContent.Any()) { return; } foreach (var sub in InnerContent) { if (string.IsNullOrEmpty(sub.Controller)) { sub.Controller = Controller; } if (string.IsNullOrEmpty(sub.Action)) { sub.Action = Action; } sub.ParentContent = this; } }
public override void FillMissingAttributes() { if (string.IsNullOrEmpty(RouteValues) && !string.IsNullOrEmpty(Caption)) { RouteValues = Caption.ToFormattedID(" "); // TODO } base.FillMissingAttributes(); }
public override void FillMissingAttributes() { if (string.IsNullOrEmpty(RouteValues) && !string.IsNullOrEmpty(Caption)) { if (!string.IsNullOrEmpty(ParentContent?.RouteValues) && !new[] { "More" }.Contains(ParentContent?.RouteValues)) { RouteValues = string.Join("_", ParentContent?.RouteValues, Caption.ToFormattedID()); return; } RouteValues = Caption.ToFormattedID(Action == "Brand" ? " " : "-"); } }