We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7923
    • 4,213 Posts
    MODx api functions take care that only documents that you have rights gets listed, so you should not see the unauthorized docs if permissions are setuped correctly. Could you explain your case more?


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 4295
      • 98 Posts
      Here class problem. Pul-leeze haaalp! (Sorry for the long post -- just want to provide all info to anyone who will help)

      I have folders like this...

      ContainerFolder (just something to hold the contents)
      -Category1folder
      --Subcategory1folder
      --Subcategory2folder
      --SubcategoryETC
      -Category2folder
      --Subcategory1folder
      --Subcategory2folder
      --SubcategoryETC
      -Category3folder
      --Subcategory1folder
      --Subcategory2folder
      --SubcategoryETC
      -Category4folder
      --Subcategory1folder
      --Subcategory2folder
      --SubcategoryETC

      I created the following chunks wfInner, wfOuter, wfRow, wfParentRow -- and wfParentRowHere...

      I’m calling Wayfinder with this call...
      [!Wayfinder? &startId=`XX` &level=`2` &parentClass=`true` &parentRowTpl=`wfParentRow` &outerTpl=`wfOuter` &innerTpl=`wfInner` &rowTpl=`wfRow` &parentRowHereTpl=`wfParentRowHere`]]

      When I click the main menu buttons a ">>" is appended to the title. If I’m in a submenu the ">>" disappears from the main menu button. That’s great and what I want but I also wish the hover state to remain (different backgrount image, font color, etc) when active -- and also for the submenus to hide. I usually just add the .here class to wherever I have the hover state but its not working. I know this should be simple but I don’t know what I’m missing.

      Below are the Wayfinder-provided CSS selectors. What in the world do I have to do to make the here class for the main menu row remain in the hover state when active and the submenus to disappear only when on that page!?! Thanks in advance to anyone who can answer this in a way I can understand 8P

      /* common styling */
      .menu {}
      .menu ul li a, .menu ul li a:visited {}
      .menu ul {}
      .menu ul li {}
      .menu ul li ul {}

      /* specific to non IE browsers */
      .menu ul li:hover a {}
      .menu ul li:hover ul {}
      .menu ul li:hover ul li a.hide {}
      .menu ul li:hover ul li:hover a.hide {}
      .menu ul li:hover ul li ul {}
      .menu ul li:hover ul li a {}
      .menu ul li:hover ul li a:hover {}
      .menu ul li:hover ul li:hover ul {}
      .menu ul li:hover ul li:hover ul.left {}
        • 7923
        • 4,213 Posts
        You can have the submenus only for the active tree by using &hideSubMenus=`1` parameter. I’m not sure if I understood your post fully, did you have some other problem too?

        Anyways, in the next version of Wayfinder, you also have &activeRowTpl and &activeParentRowTpl if that helps.. (if you need that asap, you can get a unofficial version here.)


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 4295
          • 98 Posts
          doze, thanks for the reply.

          1) Basically what I’m asking is where/how do I style the .here class for the parentRowHere? I can’t style it. I’m either doing something wrong (probably) or the here class is overridden in Wayfinder somewhere?

          2) The &hideSubMenus is great but actually it’s the opposite of what I require -- this hides all the inactive submenus and I want to hide the active submenu and have all the inactive submenus still work. It would be great if you guys considered splitting this into &hideActiveSubMenus and &hideInactiveSubMenus.
            • 16429
            • 254 Posts
            Hi kylej!
            I was developing a menu using the introtext field as a &titleOfLinks but the output was empty.

            I’ve found that on line 46 from the list of fields is missing "introtext", here it is:
                    $getFields = 'id,menutitle,pagetitle,menuindex,published,hidemenu,parent,isfolder,description,alias,longtitle';
            

            After adding the introtext, as this:
                    $getFields = 'id,menutitle,pagetitle,menuindex,published,hidemenu,parent,isfolder,description,alias,longtitle,introtext';
            


            the introtext worked as expected smiley

            Bye
              kudo
              www.kudolink.com - webdesign (surprised?)

              [img]http://www.kudolink.com/kudolinkcom.png[/img] [sup]proudly uses[/sup] [img]http://www.kudolink.com/modx.png[/img]
              • 7923
              • 4,213 Posts
              Quote from: bullrat at Sep 08, 2006, 08:57 AM

              1) Basically what I’m asking is where/how do I style the .here class for the parentRowHere? I can’t style it. I’m either doing something wrong (probably) or the here class is overridden in Wayfinder somewhere?
              What / Where / When is being overridden? Could you show your parentRowHereTpl chunk? But basically in your chunk, put some classname to the items and use it in css..

              But you know that parentRowHereTpl is used on a item if it’s the currently selected item and it’s a folder? parentRowHereTpl is not used all the way on the tree in active items. That is where activeParentRowTpl comes in. The class name that is defined in &hereClass parameter is set to all items in the active tree. If you are looking a way to set a class just to the currently selected item, use &selfClass parameter. In your template chunks, you then use [+wf.classes+] placeholder to get the class names.

              Quote from: bullrat at Sep 08, 2006, 08:57 AM

              2) The &hideSubMenus is great but actually it’s the opposite of what I require -- this hides all the inactive submenus and I want to hide the active submenu and have all the inactive submenus still work. It would be great if you guys considered splitting this into &hideActiveSubMenus and &hideInactiveSubMenus.
              All active items will get the "active" class name by default (defined with &hereClass parameter), so you could use that and hide those items via css. (display:none).

              EDIT: also, not 100% sure, but I think that if you do &activeParentRowTpl and &activeRowTpl and in the tempates just have [+wf.wrapper+] placeholder, active items will be hidden from the menu.. Just curious, why you need to hide active items though? sounds odd smiley


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 4295
                • 98 Posts
                doze, thanks for the input. I’m just confused, I suppose. I still don’t understand how to style the top-level parent folder’s active class using the selectors included with Wayfinder dropdown stylesheet. I thought it would be...
                .menu ul li a:active {blah blah}
                but that doesn’t work and neither does anything else I tried. I think the
                .menu ul li a:visited
                may be overriding my active selector or something. I don’t know and too tired to try to figure it out any longer. I even tried just plain old
                .active{blah blah}
                but even that only partially worked.

                Concerning why the request for &hideActiveSubMenus and &hideInactiveMenus ... I have a dropdown menu that is topical in nature. The first level tabs are the categories and when hovered over -- they dropdown the subcategories. I also use the BreadCrumb snippet that shows Home > CategoryName > SubcategoryName > Content. So let’s say a user clicks a category tab without choosing a subcategory from the categorys dropdown list. The user would be taken to the Category page that lists all the subcategories. Think of a Yahoo style directory. Since the subcategories are now listed on the categorys page, I don’t want the active category to redundantly display its dropdown any longer -- but I still want all the inactive categories to have active dropdowns for their subcategories.

                Did I explain that well enough? I would think that would be handy to split this function. But what do I know... I’m apparently too stupid to even figure out how to style the active class of Wayfinder undecided
                  • 4295
                  • 98 Posts
                  Doze, thanks for your added input. I’ve actually got it figured out now and everything working fine. To make the submenus disapear when active, I used ...
                  .active ul li {display:none;}
                  I had never had to kill the active menu so I didn’t understand what you meant at first but figured it out.

                  And as far as the active menu styling, man I have no idea why this was so hard for me using the default selectors included for Wayfinder’s CSSplay dropdown example. In case anyone else is pulling out their hair on a horizontal menu, I had to finally use both of these on the same properties to get my top-level active parent folder to style. I still don’t get why that is, as I would think the first would have been enough.
                  .menu ul li.active a, .menu ul li a.active


                  But I am just so freaking happy to have this beautiful opaque dropdown menu that works exactly as I want it to and will update itself as I add other categories and subcategories and content. Wooot! THANKS for Wayfinder, folks!
                    • 19004
                    • 33 Posts
                    Is there a way to use Wayfinder to get traditional site navigation working? For example, on most sites you have main navigation horizontally at the top, with links to the sub pages for the current page in a column on the left or right. If there are pages beneath a sub page, the side nav would expand to show the children for the active sub page.

                    To make this clearer:

                    [Main Nav]
                      Home | About Us | Contact Us
                    
                    [Sub Nav] (assume we've clicked on "About Us")
                      Directions
                      History
                      Staff
                    
                    [Sub Nav] (assume that we've clicked on "Staff")
                      Directions
                      History
                      Staff
                        - Guy #1
                        - Guy #2
                        - Guy #3
                    

                    Note that you don’t see an "About Us" link anywhere in the sub nav. This is my main issue with Wayfinder. &hideSubMenus gets rid of the non "About Us" pages, but I need to get rid of "About Us" in the sub menu entirely. I tried to do this with css but I don’t know it very well and I can’t get it to look right. Is there anything I can do?

                    EDIT: Also, I need to have the sub nav revealed one level at a time. Meaning that as you click into a sub page, it opens up the next level of children only. Not the whole tree. Not sure if this part is difficult or not.
                      • 15987
                      • 786 Posts
                      You can use the ultimate parent snippet nested inside of your wayfinder call to get a dynamic startId. Here is a link to the snippet: http://www.modxcms.com/UltimateParent-643.html

                      something like this:

                      [!Wayfinder? &startId=`[[UltimateParent]]`!]

                      This discussion is closed to further replies. Keep calm and carry on.