Disable menu + urgent
Last Post 08/26/2010 6:57 AM by Joseph Craig. 5 Replies.
Author Messages
Germaine
Nuke Ace
Nuke Ace
Posts:54


--
08/05/2010 1:12 AM  
Hi, is there anyway which I could disable the DNN menu programmtically? like any visible functionality to allow me to switch it on / off.. ?
Joseph Craig
DNN MVP
Posts:11667


--
08/05/2010 9:26 AM  
You could wrap the menu in a named div and set visibility or display mode to hide it. You can do that programmatically or with javascript or jquery.

Joe Craig, Patapsco Research Group
Complete DNN Support
Germaine
Nuke Ace
Nuke Ace
Posts:54


--
08/06/2010 6:38 AM  
Hi Joseph! Cool! that's what I need, may i know how do I do that?
Joseph Craig
DNN MVP
Posts:11667


--
08/08/2010 3:52 PM  
Sure, in your skin you should place a set of div tags around the part of the html that you want to control. You can use a name, and ID, or a class to make the div unique.

Then you write a javascript or jQuery function that is fired on whatever event that you need to use to enable/disable the code. Your javascript/jQuery code could set the display attribute of the div to none to turn it off.

Joe Craig, Patapsco Research Group
Complete DNN Support
Germaine
Nuke Ace
Nuke Ace
Posts:54


--
08/26/2010 2:44 AM  
Hi Joseph, could you provide me with a little more details? I tried doing it at my skin source page. but it didnt work
<dnn:artmenu id="ArtMenu1" showhiddentabs="False" showadmintabs="True" showdeletedtabs="False" showlogintab="True" showusertab="True" runat="server">


<dnn:artmenu id="ArtMenu1" showhiddentabs="False" showadmintabs="True" showdeletedtabs="False" showlogintab="True" showusertab="True" runat="server">dnn:ARTMENU ID="ArtMenu1" ShowHiddenTabs="False" ShowAdminTabs="True" ShowDeletedTabs="False" ShowLoginTab="True" ShowUserTab="True" runat="server" /><div id="TopPane" visible="false" runat="server">


   
       
         
         
         
       
      <td id="Top1" runat="server" width="33%"><td id="Top2" runat="server" width="33%"><td id="Top3" runat="server">




<td id="Top1" runat="server" width="33%"> <td id="Top2" runat="server" width="33%"> <td id="Top3" runat="server">

I need to turn this off temporary until the user logged in the 2nd time.
Joseph Craig
DNN MVP
Posts:11667


--
08/26/2010 6:57 AM  


Sure.  In your skin do something like this:


     < div class="myHide" >

            < dnn:ARTMENU ID="ArtMenu1" ShowHiddenTabs="False" ShowAdminTabs="True" ShowDeletedTabs="False"
                                             ShowLoginTab="True" ShowUserTab="True" runat="server" />


     < / div >


Then, in your CSS you will have:

     .myHide{display:none}


Then your jQuery will be something like this:  $(".myHide").css("display", "inline");

You will need to construct the code that fires this jQuery at the right time.

Joe Craig, Patapsco Research Group
Complete DNN Support


---