Ejemplo n.º 1
0
 public virtual void FillMissingAttributes()
 {
     if (string.IsNullOrEmpty(RouteValues) && !string.IsNullOrEmpty(Caption))
     {
         RouteValues = Caption.ToFormattedID();
     }
 }
Ejemplo n.º 2
0
        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;
            }
        }
Ejemplo n.º 3
0
 public override void FillMissingAttributes()
 {
     if (string.IsNullOrEmpty(RouteValues) && !string.IsNullOrEmpty(Caption))
     {
         RouteValues = Caption.ToFormattedID(" ");                                                                                  // TODO
     }
     base.FillMissingAttributes();
 }
Ejemplo n.º 4
0
        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" ? " " : "-");
            }
        }