Exemple #1
0
        private static OrganizationInfo GetContainerOrganizationInfo(this Item item)
        {
            var organizationInfo          = new OrganizationInfo();
            var containerOrganizationInfo = item.Container.GetOrganizationInfo();

            organizationInfo.AddRange(containerOrganizationInfo.Select(node => new OrganizationInfo.Node(node.ItemInfo, node.RelativePath)));
            organizationInfo.Last().RelativePath = "./";
            return(organizationInfo);
        }
Exemple #2
0
        protected virtual string GetHtmlNavigation()
        {
            var htmlBuilder = new StringBuilder();

            htmlBuilder.Append("<code>");
            foreach (var node in OrganizationInfo.Take(OrganizationInfo.Count - 1))
            {
                htmlBuilder.Append($"<a href=\"{node.RelativePath}index.html\">{HtmlEncoder.Default.Encode(node.ItemInfo.Name)}</a> / ");
            }
            htmlBuilder.Append(HtmlEncoder.Default.Encode(OrganizationInfo.Last().ItemInfo.Name));
            htmlBuilder.Append("</code>");
            return(htmlBuilder.ToString());
        }