Beispiel #1
0
        public static Page GetParent(this Page page)
        {
            var parentAbsoluteName = FullNameHelper.GetParentAbsoluteName(page.AbsoluteName);

            if (!string.IsNullOrEmpty(parentAbsoluteName))
            {
                return(new Page(page.Site, parentAbsoluteName));
            }
            return(null);
        }
Beispiel #2
0
 public Site(Site parent, string name)
 {
     this.Name = name;
     if (parent != null)
     {
         this.AbsoluteName = FullNameHelper.Combine(parent.AbsoluteName, name);
     }
     else
     {
         this.AbsoluteName = name;
     }
 }
Beispiel #3
0
 public Site(string fullName)
 {
     this.Name         = FullNameHelper.GetName(fullName);
     this.AbsoluteName = fullName;
 }
Beispiel #4
0
 public Page(Page parent, string name)
 {
     this.Site         = parent.Site;
     this.AbsoluteName = FullNameHelper.Combine(parent.AbsoluteName, name);
     this.Name         = name;
 }
Beispiel #5
0
 public Page(Site site, string fullName)
 {
     this.Site         = site;
     this.AbsoluteName = fullName;
     this.Name         = FullNameHelper.GetName(fullName);
 }