Example #1
0
        /// <summary>
        /// Responsible for rendering the DNNMenu and in an uplevel rendering of the Menu, sending down the xml for the child nodes in a ClientAPI variable.
        /// </summary>
        /// <param name="writer"></param>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [Jon Henning]	5/6/2005	Created
        ///		[Jon Henning 4/6/2005	Commented
        /// </history>
        protected override void Render(HtmlTextWriter writer)
        {
            MenuWriter.RenderMenu(writer, this);
            //added back...??? not sure if this is ok... - urllist needs it
            //If Me.IsDownLevel = False Then DotNetNuke.UI.Utilities.ClientAPI.RegisterClientVariable(Me.Page, Me.ClientID & "_xml", Me.MenuNodes.ToXml, True)
            Control oCtl;

            foreach (Control tempLoopVar_oCtl in this.Controls)
            {
                oCtl = tempLoopVar_oCtl;
                oCtl.RenderControl(writer);
            }
        }
Example #2
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Responsible for rendering the DNNMenu and in an uplevel rendering of the Menu, sending down the xml for the child nodes in a ClientAPI variable.
        /// </summary>
        /// <param name="writer"></param>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [Jon Henning]	5/6/2005	Created
        ///		[Jon Henning 4/6/2005	Commented
        /// </history>
        /// -----------------------------------------------------------------------------
        protected override void Render(HtmlTextWriter writer)
        {
            MenuWriter.RenderMenu(writer, this);
            //added back...??? not sure if this is ok... - urllist needs it
            //If Me.IsDownLevel = False Then DotNetNuke.UI.Utilities.ClientAPI.RegisterClientVariable(Me.Page, Me.ClientID & "_xml", Me.MenuNodes.ToXml, True)
            foreach (Control oCtl in this.Controls)
            {
                oCtl.RenderControl(writer);
            }

            if (IsDownLevel == false)
            {
                ClientAPI.RegisterStartUpScript(this.Page, this.ClientID + "_startup", "<script>dnn.controls.initMenu($('" + this.ClientID + "'));</script>");
            }
        }