Exemple #1
0
        /// <summary>
        /// Renders this instance as Html.
        /// </summary>
        /// <returns></returns>
        public override string Render()
        {
            var menuitems = MenuEntry.FrontPages();
            var buffer    = new StringBuilder();


            buffer.Append("<ul>" + Environment.NewLine);
            foreach (var item in menuitems)
            {
                string link = string.Format("<li><a href=\"{0}\">{1}</a></li>", HttpUtility.HtmlEncode(item.UrlAbsolute), HttpUtility.HtmlEncode(item.Name));
                buffer.Append(link);
            }
            buffer.Append("</ul>" + Environment.NewLine);
            string html = buffer.ToString();

            return(html);
        }