We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22202
    • 23 Posts
    Hi,

    I have to port a design to Modx, things go relatively smoothly apart a little problem with dropmenu.
    the menu is dependant of a CSS and a Javascript.

    My problem is that with DropMenu i can only put a "class" attribut to the main UL and not both a "class" and "id" attribut.


    Do you know any possibility to have both "class" and "id" attributs on the main UL with dropmenu ?


    Here are some of my code and things i have tried.

    the HTML code for the menu works like that :
    [tt]
    <ul class="menu" id="outils">
    <li class="first"><a href="page_int.html">Outils de virtualisation</a></li>
    <li><a href="#">Outils de migration</a></li>
    <li><a href="#">Procédures d’exploitation</a></li>
    <li><a href="#">Outils de sauvegarde</a></li>
    <li><a href="#">Outils d’automatisation</a></li>
    <li><a href="#">Outils de supervision</a></li>
    </ul>
    [/tt]

    I tried to adapt it to dropmenu by doing this :
    [tt]
    <ul class="menu" id="outils">
    [!DropMenu? &startDoc=`2` &levelLimit=`1`!]
    </ul>
    [/tt]
    which works in all browser except IE sad

    I have also tried to do all of the above, and none works :
    [tt]
    <ul class="menu" id="outils">
    [!DropMenu? &topnavClass=`menu` &startDoc=`2` &levelLimit=`1`!]
    </ul>
    [/tt]
    [tt]
    <ul id="outils">
    [!DropMenu? &topnavClass=`menu` &startDoc=`2` &levelLimit=`1`!]
    </ul>
    [/tt]
    [tt]
    [!DropMenu? &topnavClass=`menu id="outils` &startDoc=`2` &levelLimit=`1`!]
    [/tt]
    [tt]
    <div="outils">
    [!DropMenu? &topnavClass=`menu` &startDoc=`2` &levelLimit=`1`!]
    </div>
    [/tt]

    Thanks a lot in advance.
    If i am not clear enough, please tell me.

      • 27305
      • 173 Posts
      I would like this hack too if anyone can do one.

      ss
        I made my first site with modx
        ------------------------
        Shopping blog
        Sky+ HD
        • 22815
        • 1,097 Posts
        Quote from: omid at May 11, 2006, 03:04 PM

        I have also tried to do all of the above, and none works :
        [tt]
        [!DropMenu? &topnavClass=`menu id="outils` &startDoc=`2` &levelLimit=`1`!]
        [/tt]
        Did you mean to miss out a " in that example? This should really be
        [!DropMenu? &topnavClass=`menu" id="outils` &startDoc=`2` &levelLimit=`1`!]


        What happened when you tried that?
        EDIT: This doesn’t work due to the = sign.
          No, I don&#39;t know what OpenGeek&#39;s saying half the time either.
          MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
          Forum: Where to post threads about add-ons | Forum Rules
          Like MODx? donate (and/or share your resources)
          Like me? See my Amazon wishlist
          MODx "Most Promising CMS" - so appropriate!
          • 22202
          • 23 Posts
          Actually, i’ve done it by rewriting another snippet based/inspired on dropmenu.
          And i have integrated all the elements that i want directly inside the code, so it wouldn’t be very interessant to share.

          My advice to you would be, to look carefully inside dropmenu, and if what you want to do is not too complexe, re-write another custom snippet.
            • 22202
            • 23 Posts
            Did you mean to miss out a " in that example? This should really be
            [!DropMenu? &topnavClass=`menu" id="outils` &startDoc=`2` &levelLimit=`1`!]


            What happened when you tried that?

            Actually, i didn’t tried it ...
            but really, when you look inside it dropmenu isn’t that complexe and you can write another snippet based on it.
            if u want, i can post you the code of my modified snippet