We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47267
    • 9 Posts
    I'm still feeling my way around MODx but I have something which has me stumped (and probably unable to see the wood for the trees by now) but I'd have thought was fairly standard.

    I'm playing around on XAMPP with a site that is using "Theme.Bootstrap" and has pdoTools installed.

    Now whilst I have some trial pages, a working menu and everything using the bootstrap theme I've chosen - something is bugging me.

    I'm trying to get a menu item which is just a drop down showing pages. I believe the ressource needs to be a "container" with no style attached.
    This shows up in the menu as I think it should i.e. just a menu item which does nothing more than reveal its drop-down when I click it.

    BUT when I view one of the pages the breadcrumb I have at the top of it is showing the container as a link which is clickable.

    For example, the menu :-

    Home | A Page | Product

    Where "Product" is the container and just shows the drop down.
    Now on that say I have a page called "Product 1" it shows up in the menu as expected but where I have the breadcrumb at the top it shows as :-

    Home/Product/Product1

    Where I can click on both the "Home" and "Product" items. Obviously if I click on "Home" I get my home page but if I click on "Product" an empty page happens.

    How do I stop that from happening? Is it to do with the page resource's parent?

    Thank you.
      • 36926
      • 701 Posts
      The easiest way would be to use this:
      http://rtfm.modx.com/extras/revo/firstchildredirect
        • 47267
        • 9 Posts
        Quote from: bennyb at Oct 15, 2014, 06:43 PM
        The easiest way would be to use this:
        http://rtfm.modx.com/extras/revo/firstchildredirect

        I tried that but all it does (as the name implies) is re-direct to the FIRST child, regardless of which of the child pages I'm on. It gets confusing if you are on the second or third child page and you click on that and get sent to the first child instead.

        I'd just rather it wasn't there - or at least wasn't an active link. But as it is there I'm going to try and make it into a basic page just listing the children and see what that looks like but it isn't my ideal solution.
          • 22427
          • 793 Posts
            • 47267
            • 9 Posts
            Quote from: ottogal at Oct 16, 2014, 06:02 AM
            You may find some other hints in this thread:
            https://forums.modx.com/thread/94630/how-to-make-one-of-my-top-level-nav-items-not-load-a-resource

            Thank you. I had come across that thread this morning but its not quite offering me the solution I wanted but it also raised another question. If I actually have a page for the drop-down link in the menu, clicking on it does nothing except show the sub-menu, it doesn't show the page itself. But then the breadcrumb will navigate to the page. Again, this is not right.

            Maybe I'll just not have submenus and drop-downs.

            What seems to be throwing me is the apparent difference in behaviour between a menu item and a breadcrumb.
              • 36926
              • 701 Posts
              What snippet is creating the breadcrumbs?
                • 9995
                • 1,613 Posts
                Maybe you can do something with the wayfinder NavbarParentRow.

                [[Wayfinder? &startId=`0` &level=`2` &outerTpl=`NavbarOuter` &rowTpl=`NavbarRow` &activeParentRowTpl=`NavbarActiveParentRow` &parentRowTpl=`NavbarParentRow` &innerTpl=`NavbarInner` &innerRowTpl=`NavbarInnerRow` &removeNewLines=`1`]]


                This is an Evo example code of NavbarParentRow where the dropdown button shows the dropdown but clicking on the link it loads that page. You have to css the dropdown icon (caret) to be floating to the right or something.

                <li class="dropdown">
                  <a href="[+wf.link+]" title="[+wf.linktext+]">[+wf.title+]</a> 
                  <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="[+wf.title+]">
                    <b class="caret"></b>
                  </a>
                  [+wf.wrapper+]
                </li>
                


                Don't know if this would help and work. smiley
                  Evolution user, I like the back-end speed and simplicity smiley
                  • 44123
                  • 21 Posts
                  I think you are looking for a menu like the one on this site: Suncook Carpentry, the menu has articles and featured items which aren't links to a blank page, but instead drop down a list.

                  To build that menu I followed the tutorial here: MODX Revolution Beginner Tutorials Updated to Revolution 2.2 | The Coding Pad
                    • 47267
                    • 9 Posts
                    Aaaarrgggh!! Bloomin' phone ....
                    Had a nice reply laid out. Lets try again.

                    I am using (trying anyway) Theme.Bootstrap which has installed pdoTools. This is what takes care of the menuing and breadcrumbs as far as I can figure out. I did try and set a page for the resource to just show a list of its child pages with a getResources call but I'm obvoiusly missing something with that.

                    I've also read the tutorials WillyP mentioned above but as its a different theme and Wayfinder, I'm a little stuck. I'll have a look at that site anyway, maybe its source will help.

                    Thanks all for the help so far.