Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...DNNMENU CSS HelpDNNMENU CSS Help
Previous
 
Next
New Post
6/11/2007 12:02 PM
 

I cannot set the background color on any of the menu items using the menu properties or in code, what is the deal with this menu.  Can someone help me out please? 

DefaultChildNodeCssClass="SideNavMenu" 
DefaultIconCssClass="SideNavMenu" 
DefaultNodeCssClass="SideNavMenu" 
DefaultNodeCssClassOver="SideNavMenu" 
DefaultNodeCssClassSelected="SideNavMenu"

   Imports DotNetNuke.UI.WebControls

Partial Class DesktopModules_DNNMenu_Menu
    Inherits Entities.Modules.PortalModuleBase
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        If Not Page.IsPostBack Then
            EFTDNNMenu.ImageList.Add("/Images/spacer.gif")
            EFTDNNMenu.ImageList.Add("/Images/spacer.gif")
            PopulateTree()
        End If
    End Sub

    Private Sub PopulateTree()
        EFTDNNMenu.MenuNodes.Clear()

        Dim index As Integer = 0
        Dim objNode As MenuNode = New MenuNode("Tutorials")
        objNode.NavigateURL = "http://www.adefwebserver.com/DotNetNukeHELP/"
        objNode.ToolTip = "DotNetNuke Tutorial Series"
        objNode.ImageIndex = eImageType.Folder
        objNode.ClickAction = eClickAction.Navigate
        objNode.HasNodes = True
        EFTDNNMenu.MenuNodes.Add(objNode)

        index = objNode.MenuNodes.Add()
        objNode = objNode.MenuNodes(index)
        objNode.Text = "DotNetNuke 4"
        objNode.ToolTip = "DotNetNuke 4 Tutorials"
        objNode.ImageIndex = eImageType.Folder
        objNode.ClickAction = eClickAction.Expand
        PopulateChildrenMenuNodes(objNode)

    End Sub

    Private Sub PopulateChildrenMenuNodes(ByVal objParent As MenuNode)
        Dim index As Integer = 0
        Dim objMenuNode As MenuNode

        index = objParent.MenuNodes.Add()
        objMenuNode = objParent.MenuNodes(index)

        objMenuNode.CSSClass = "SideNavMenu"
        objMenuNode.CssClassOver = "SideNavMenu"
        objMenuNode.CSSClassSelected = "SideNavMenu"
        objMenuNode.Text = "Super-Simple Module (DAL+)"
        objMenuNode.NavigateURL = "http://www.adefwebserver.com/DotNetNukeHELP/DNN_ShowMeThePages/"
        objMenuNode.ImageIndex = eImageType.Page
        objMenuNode.ClickAction = eClickAction.Navigate
        index = objParent.MenuNodes.Add()

        objMenuNode = objParent.MenuNodes(index)
        index += 1
        objMenuNode.CSSClass = "SideNavMenu"
        objMenuNode.CssClassOver = "SideNavMenu"
        objMenuNode.CSSClassSelected = "SideNavMenu"
        objMenuNode.Text = "Super-Fast Super-Easy Module (DAL+)"
        objMenuNode.NavigateURL = "http://www.adefwebserver.com/DotNetNukeHELP/DNN_Things4Sale/"
        objMenuNode.ImageIndex = eImageType.Page
        objMenuNode.ClickAction = eClickAction.Navigate
        index = objParent.MenuNodes.Add()

        objMenuNode = objParent.MenuNodes(index)
        index += 1
        objMenuNode.CSSClass = "SideNavMenu"
        objMenuNode.CssClassOver = "SideNavMenu"
        objMenuNode.CSSClassSelected = "SideNavMenu"
        objMenuNode.Text = "Create a full complete Module"
        objMenuNode.NavigateURL = "http://www.adefwebserver.com/DotNetNukeHELP/DNN_Module4/"
        objMenuNode.ImageIndex = eImageType.Page
        objMenuNode.ClickAction = eClickAction.Navigate

    End Sub

    Public Enum eImageType
        Folder
        Page
    End Enum

    Protected Sub EFTDNNMenu_PopulateOnDemand(ByVal source As Object, ByVal e As DotNetNuke.UI.WebControls.DNNMenuEventArgs) Handles EFTDNNMenu.PopulateOnDemand
        PopulateChildrenMenuNodes(e.Node)
    End Sub
End Class

 

 

If every an app needed a good vertical menu module that supports sub menu items and has a UI for module distribution god does this one.

 

 
New Post
6/11/2007 12:33 PM
 

You shouldn't need to edit the code directly to change the background. Does your app need to specifically use the DNNMenu? The default SolPartMenu can be configured by just editing an XML and CSS file that is part of the skin your building.

If you need to use the DNNMenu, I suggest opening up the web site in your favorite browser and then opening up the source code to view the site as a client sees it. Find the class that governs the element that you want to change and then use the skin's CSS file to override the class in the file itself.

Again, I think that your frustration stems from you going too deep by editing the code for DNNMenu; it should just be a CSS value to change.

Feel free to correct me if I am wrong here.

Regards,

Christopher Koeber


Regards,
Christopher Koeber
 
New Post
6/11/2007 2:42 PM
 

Thanks for the tip on viewing the source, got it now. I was also updating the wrong stylesheet (_default). 

Would you happen to know how to update the hover on the submenu items? I can get the root menu items to work using the DefaultNodeCssClassOver but I do not see a property for the childnodes to go along with the DefaultChildNodeCssClass. 

 
New Post
6/11/2007 11:45 PM
 

This link is the best that I could find on skinning the DNNMenu. It has some of the CSS Classes listed in the PDF labeled for the DNNMenu. I am going to create a separate post asking for people to post documentation, etc. about the menu since

  1. SOLPARTMENU was the default so most people are used to that and ...
  2. There isn't much info out there for skinning or using the DNN menu.

Regards,

Christopher Koeber


Regards,
Christopher Koeber
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...DNNMENU CSS HelpDNNMENU CSS Help


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out