Carrotware.CMS.UI.Controls.TwoLevelNavigation.WriteListPrefix C# (CSharp) Method

WriteListPrefix() protected method

protected WriteListPrefix ( System.Web.UI.HtmlTextWriter output ) : void
output System.Web.UI.HtmlTextWriter
return void
        protected override void WriteListPrefix(HtmlTextWriter output)
        {
            if (!SiteData.IsWebView) {
                cssText.RenderControl(output);
                output.Write(GetCtrlText(cssText));
            }

            string sCSSWrap = "";
            if (!String.IsNullOrEmpty(CssClass)) {
                sCSSWrap = String.Format(" class=\"{0}\"", CssClass);
            }

            if (WrapList) {
                output.WriteLine("<div" + sCSSWrap + " id=\"" + this.HtmlClientID + "\">");
                output.Indent++;
                output.WriteLine("<div id=\"" + this.HtmlClientID + "-inner\">");
                output.Indent++;
            }

            string sCSSList = this.CSSULClassTop.Trim();
            string sLstID = this.HtmlClientID + "-list";

            if (!WrapList) {
                sCSSList = (this.CSSULClassTop + " " + this.CssClass).Trim();
                sLstID = this.HtmlClientID;
            }

            if (!String.IsNullOrEmpty(sCSSList)) {
                output.WriteLine("<ul id=\"" + sLstID + "\" class=\"" + sCSSList + "\">");
            } else {
                output.WriteLine("<ul id=\"" + sLstID + "\" >");
            }
        }