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

    Is there a way to make DropMenu give a class to each page that has subpages? Sort of like the tree in the manager?

    I use css to hide all list items except the ones with a parent with class="here", and I want a way to show visitors which pages have subpages...

    I’ve searched extensively, but I’m either not using the right search words, or nothing has been written about this in the forums...
      • 36451
      • 264 Posts
      Good question. I’m interested in an answer, too. Somebody?
        • 5338
        • 35 Posts
        There is an indication of the opposite. You have a class "last", whenever that page do not have any children.

        Does this resolve your css matters?
          • 6726
          • 7,075 Posts
          Funny you ask this, I have the need for the very same thing, as anyone who builds a pure css dropmenu will if the’re concerned with UI.

          To my knowledge, DropMenu (and its variant) does not provide the necessary code to do what you (and I) need : e.g a css class for every folder with at least one children.

          The "last" class won’t help with this, I am afraid, as it only styles the last element of a list...
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 8642
            • 28 Posts
            Quote from: cino at Jun 15, 2006, 02:32 PM

            There is an indication of the opposite. You have a class "last", whenever that page do not have any children.

            Does this resolve your css matters?

            No and no. The "last" class is only applied to the last list item in the list. It doesn’t apply to other list items, regardless of wether they have children or not. I’ve checked: I have a menu where the last four items in the main list don’t have children, and only the last one gets the "last" class.

            I need a "has_children"-class that applies to every list item with children, not only the last item on the list.
              • 5338
              • 35 Posts
              I see now. I can do that (I think).

              Stand by.
                • 6726
                • 7,075 Posts
                That would be awesome grin
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 8642
                  • 28 Posts
                  Quote from: cino at Jun 16, 2006, 08:14 AM

                  I see now. I can do that (I think).

                  Stand by.
                  Standing by, holding my brea... grin
                    • 34162
                    • 1 Posts
                    I fear this is not a complete solution, just a hint:
                    children are always wrapped in a sub <ul> element. A childless node could therefore be detected by a li li sequence - i.e. with no ul in between. In CSS it should be possible to create a selector for this like "li>li".
                    Don’t know if this helps, just a thought... wink
                      • 11975
                      • 2,542 Posts


                      In CSS it should be possible to create a selector for this like "li>li".


                      I’ve tried to do so but IE (as usual shoud I say) does not offer support of this (as far as i know)
                        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l