Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eric Venneker 10 posts 31 karma points
    Aug 14, 2010 @ 18:16
    Eric Venneker
    0

    Menu.NewDropDownList()

    I am trying to create a dropdownlist in the menubar of a custom section. I already have found the Menu.NewDropDownList() function and id does create a simple dropdownlist. However the styling seems to be a bit of.

    If the ddl does not have any items it will sit between a set of buttons (although it is rendered halfway down vertically in the menu).

    When there are items in the ddl, it is drawn below the menu behind the rest of the pagecontent.

    Is there anyone who has used a dropdownlist in a custom section? And how did you do this.

    If the description above is a bit sketchy, I will supply a few screenshots to illustrate my problem.

    Thanks!!

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 16, 2010 @ 11:02
    Sebastiaan Janssen
    0

    I'm not directly familiar with custom sections, but if you have an example of a section in Umbraco that already uses a dropdownlist like the one you need, I suggest you have a look at the Umbraco source to see how it was implemented. 

    That being said, hopefully someone else can reply with an easier example.

  • Eric Venneker 10 posts 31 karma points
    Aug 16, 2010 @ 13:13
    Eric Venneker
    0

    Well, that is the whole issue. There is no example that I am aware of that uses a dropdownlist in a menu.

    The Umbraco source stores the dropdownlist in an array, and renders it in a seperate function which wraps al the controls in the array in a table and several div's.

    I have made some screenshots to illustrate the issue:

    empty: http://www.cipsoftware.nl/umbracoforum/ddl-empty.png

    filled: http://www.cipsoftware.nl/umbracoforum/ddl-filled.png

    In the filled screenshot the dropdownlist is completely hidden behind the content. The blue border is the dropdownlist in this case.

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Aug 17, 2010 @ 08:11
    Sebastiaan Janssen
    0

    Ah, I was wondering what you meant with a dropdownbox in the menu, screenshots help. Looks to me like it's just a matter of applying some CSS styles to position the dropdown appropriately. I'm not great with CSS so I can't help much there.

  • Eric Venneker 10 posts 31 karma points
    Aug 19, 2010 @ 21:17
    Eric Venneker
    0

    I have solved it as per Sebastiaan's suggestion with a single additional piece of inline css 'position: absolute'. It is not pretty but at least the dropdownlist is visible. Although I believe this should not be necessary.

    The function supplied (Menu.NewDropDownList()) should handle this and supply the required wrapping and/or CSS

Please Sign in or register to post replies

Write your reply to:

Draft