We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15987
    • 786 Posts
    Thats strange, can you post your whole snippet call and a screenshot of what your doc tree looks like. I can’t duplicate the level=`0` not working on my tests and would like to fix any problem with it.

    Thanks,
    Kyle
      • 11975
      • 2,542 Posts
      Quote from: kylej at Aug 03, 2006, 02:14 PM

      Here is how the startUltimateParent & topDoc are supposed to work. If you call it like your example, when you are on a page inside of folder 56 you will see a menu that shows all items under doc folder 56. If you are not in folder 56 it will start from the site root 0. It acts this way because the currentdocId and the topdoc is passed to the ultimateparent function (same as the snippet). So if you are inside folder 56 ultimateparent will go up the tree until it hits 56 to find where to start the menu from. If you are not inside folder 56 it will go up the tree all the way to 0 because it will never find doc 56.

      I hope that makes sense, let me know if it is not functioning this way for you.

      Still a bit confused but sounds logical.

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 28338
        • 46 Posts
        Quote from: kylej at Aug 03, 2006, 04:33 PM

        Thats strange, can you post your whole snippet call and a screenshot of what your doc tree looks like. I can’t duplicate the level=`0` not working on my tests and would like to fix any problem with it.

        Is it easy to read when I have specified almost everything? smiley

        [!WayFinder? &level=`0` &startId=`581` &outerTpl=`menu_outerTpl` &parentRowTpl=`menu_parentRowTpl` &hereTpl=`menu_hereTpl` &innerTpl=`menu_innerTpl` &innerRowTpl=`menu_innerRowTpl` &innerHereTpl=`menu_innerHereTpl` &firstClass=`first` &lastClass=`last` &hereClass=`here` &parentClass=`parent` &rowClass=`row` &levelClass=`level` &outerClass=`outer` &innerClass=`inner`!]


        Mind the language in the shot of the tree structure...

        No parent class appears, and it’s the same if I remove the level statement completly.
          • 15987
          • 786 Posts
          Ok, it is an error. When the level param is set to 0 it will not display the parent class. I must have overlooked that when I made a previous change to that same class setting. I will update this and get out a new version. Thanks for finding that error smiley
            • 28338
            • 46 Posts
            Quote from: kylej at Aug 03, 2006, 05:37 PM

            Thanks for finding that error smiley

            You’re welcome. Thanks for correcting it smiley
              • 15987
              • 786 Posts
              Quote from: heliotrope at Aug 03, 2006, 10:20 AM

              EDIT: about the code posted above, I was thinking that we could achieve the same result by adding to each item a css id made with its id prefixed with doc. The only reason I prefered using TV is for css reading and coding.

              heliotrope, I think I am leaning toward adding this ability but not using a tv. Doing it with a tv makes it hit the database each time it needs to get the tv value which could greatly increase processing time on large menus. So here is what I was thinking (similar to what you have above):

              add a parameter like &rowIdPrefix
              add a new placeholder [+wf.id+] for the following templates: rowTpl,parentRowTpl,hereTpl,innerRowTpl,innerHereTpl
              If the parameter is specified in the snippet call add the docid to the value from &rowIdPrefix and then insert it into the template.

              It will make for some strange ids but will not require another db per item and will give you the functionality you are looking for.

              What do you think?
              • Kyle, regarding the UltimateParent functionality, why don’t we pull it out and let the UltimateParent snippet do it’s own thing here. No reason not to nest them and would keep the snippet from drifting off into bloatland.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 15987
                  • 786 Posts
                  Quote from: rthrash at Aug 03, 2006, 07:02 PM

                  Kyle, regarding the UltimateParent functionality, why don’t we pull it out and let the UltimateParent snippet do it’s own thing here. No reason not to nest them and would keep the snippet from drifting off into bloatland.

                  I have no problem with that. I will take it out for the next release.
                    • 15987
                    • 786 Posts
                    I have updated the repository with Wayfinder beta2. It includes the following fixes/changes:


                    • Fixed bug for assigning parentClass
                    • Added parameter rowIdPrefix to create a custom id for each menu item
                    • Removed ultimateparent functionality, if you want to use this, nest the snippet calls.
                    • Added parentRowHereTpl, this tempalte is used on a folder if it is the current doc
                    • Added selfClass, this sets a class for the current doc only (hereClass sets a class for the current doc and its parents)

                    Get it here: http://modxcms.com/Wayfinder-868.html
                      • 11975
                      • 2,542 Posts
                      Quote from: kylej at Aug 03, 2006, 06:54 PM

                      Quote from: heliotrope at Aug 03, 2006, 10:20 AM

                      EDIT: about the code posted above, I was thinking that we could achieve the same result by adding to each item a css id made with its id prefixed with doc. The only reason I prefered using TV is for css reading and coding.

                      heliotrope, I think I am leaning toward adding this ability but not using a tv. Doing it with a tv makes it hit the database each time it needs to get the tv value which could greatly increase processing time on large menus. So here is what I was thinking (similar to what you have above):

                      add a parameter like &rowIdPrefix
                      add a new placeholder [+wf.id+] for the following templates: rowTpl,parentRowTpl,hereTpl,innerRowTpl,innerHereTpl
                      If the parameter is specified in the snippet call add the docid to the value from &rowIdPrefix and then insert it into the template.

                      It will make for some strange ids but will not require another db per item and will give you the functionality you are looking for.

                      What do you think?

                      I think you’re great ;-)

                      That’s a smarter way to achieve it.

                      Thx for considering my request.

                      :-)
                        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l

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