1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Create menu with dropdown submenus

Discussion in 'Drupal' started by s_ruben, Jun 7, 2011.

  1. #1
    Hi,

    I want to create a theme for Drupal 7 and now I have a problem with menus. I want to create a menu with submenus, but I cannot find a function or module or something else which will return or echo all menus with submenus. Please help me.

    Thank you.
     
    s_ruben, Jun 7, 2011 IP
  2. serena85

    serena85 Peon

    Messages:
    892
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can try Dreamwaver because it has a very simple drop down menu or if you want you can learn Flash and create it yourself from zero but you must check some tutorials first.
     
    serena85, Jun 7, 2011 IP
  3. cjscully

    cjscully Active Member

    Messages:
    53
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #3
    This kind of functionality with menus is not built into Drupal, nor is it enabled with a module. It is usually coded into the theme with Javascript. Best advice I can give on this is to do a Google Search on "suckerfish menus" and implement some of the examples from the search results in your theme.
     
    cjscully, Jun 7, 2011 IP
  4. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #4
    Thank you, but I know javascript well. :) I want to know how to get all menus with its child menus in Drupal 7. When I get all it I can create the menu I want by javascript.
     
    s_ruben, Jun 7, 2011 IP
  5. cjscully

    cjscully Active Member

    Messages:
    53
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #5
    OK. I couldn't tell from your post what you did and didn't know in this area. As for what you're trying to do, you might check out this post on drupal.org: http://drupal.org/node/1047386
     
    cjscully, Jun 7, 2011 IP
  6. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #6
    Thank you cjscully,

    I've done it by adding

    
     print render(menu_tree("main-menu", 1)); 
    
    PHP:
     
    s_ruben, Jun 7, 2011 IP