We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29076
    • 615 Posts
    Is there a way to do this:

    Please take a look at trebaat.net/index.php. There is the main categories in the horisontal menu on the top. And when I click a category, I want to get a menu that is related to the category on the left side.

    I tried to use &startId=`[[UltimateParent]]`, but it doesn’t do the trick.

    It can be done with different templates for every category, but I want to try to do with only one, a let Wayfinder do the job. If it’s possible.

    As it is now, the leftmenu is set to &startId=`0`. and therefor it shows the hole menu, but I want to only show the second level, and use the topmenu as level one.

    Trebaat.net/index.php is under construction, and it’s in Norwegian, but it will give a clue.

    Thanks in advance, and thank you all for making this great community.
      I think, thererfor I am! But what I am, and why...?
      • 7923
      • 4,213 Posts
      &startId=`[[UltimateParent]]` parameter in the side menu should do it, what’s your whole snippet call?


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 29076
        • 615 Posts
        Thanks for answering. Using UltimateParent doesn’t do it the way i wan’t it. A way I can do it is to put the hole snippetcall in a TV in the main category-documents (Topmenu), with &startId=` the ID for the maindocuments in the Topmenu ` .

        My hole snippet-call is like this:

        [[Wayfinder? &startId=`0` &parentClass=`show` &outerTpl=`menyOuterTpl` &innerTpl=`menyInnerTpl` &rowTpl=`menyRowTpl` &parentRowTpl=`menyParentRowTpl` ]]
          I think, thererfor I am! But what I am, and why...?
          • 7923
          • 4,213 Posts
          Quote from: Sylvaticus at Nov 01, 2006, 07:39 PM

          Thanks for answering. Using UltimateParent doesn’t do it the way i wan’t it.
          What does it do wrong then? Could you take a screenshot from the site tree and explain how it works and what you want it to list.

          You know that UltimateParent get’s the first document frome the tree that the current document is under.. there is parameters to set to it to get the second document for example, if needed (not 100% sure if that parameter is in there by default, but I did that modification to someone once).


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 15987
            • 786 Posts
            When you click on the category it takes you to that categories page, so wouldn’t you want the startId to be the docId of the current page. By default Wayfidner use the current page startId, so just remove the startId parameter and it should work. You could also do &startId=`[*id*]`
              • 29076
              • 615 Posts
              I want to have a new menu for every category I click on in the topmenu. But I want to see ALL the levels (the hole menu) regardless of the document I click on in the left menu.

              Please see exsample:
              [table]
              [tr]
              [td]Klinkbåt[/td][td][/td][td][/td][td][/td]
              [/tr]
              [tr]
              [td][/td][td]Bildegalleri[/td][td][/td][td][/td]
              [/tr]
              [tr]
              [td][/td][td][/td][td]testgalleri[/td][td][/td]
              [/tr]
              [tr]
              [td][/td][td]Testside[/td]
              [/tr]
              [tr]
              [td][/td][td]ny test[/td]
              [/tr]
              [tr]
              [td][/td][td]Enda en testside[/td]
              [/tr]
              [tr]
              [td][/td][td][/td][td]Test for å se meny[/td]
              [/tr]
              [tr]
              [td][/td][td][/td][td][/td][td]Tredjenivå[/td]
              [/tr]
              [tr]
              [td][/td][td][/td][td]Enda et element[/td]
              [/tr]
              [tr]
              [td][/td][td]Tredje side[/td]
              [/tr]
              [tr]
              [td][/td][td]Fjerde side[/td]
              [/tr]
              [/table]

              When I click on Klinkbåt I want the hole blue menu to show up. And when I click on Test for å se meny or Enda et element or Tredje side I still want the hole blue menu to be there.

              I only want the menu to change when I click on another item in the topmenu.

              Hopefully this is understandable, and thank you all for trying to help me.
                I think, thererfor I am! But what I am, and why...?
                • 7923
                • 4,213 Posts
                Yes, this is what ultimate parent in startId does. I’m really not understanding why it is not working for you, can you say what it is doing wrong?

                You need to have the outer snippet call uncached and UltimateParent cached.

                So your topmenu would be something like:

                [!Wayfinder? &startId=`0` &level=`1`!]

                And your side menu:

                [!Wayfinder? &startId=`[[UltimateParent]]` &parentClass=`show` &outerTpl=`menyOuterTpl` &innerTpl=`menyInnerTpl` &rowTpl=`menyRowTpl` &parentRowTpl=`menyParentRowTpl`!]


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 29076
                  • 615 Posts
                  Thank you very much for your patience! I really appreciate it.

                  When I use [!Wayfinder? &startId=`[[UltimateParent]]` ..... and I click Enda en testside, the leftmenu then shows

                  Test for å se meny
                  Tredjenivå
                  Enda et element


                  and not the hole blue menu (ref: http://trebaat.net/index.php?id=10).

                  One way to do what I want is to make chunks like this:

                  klinkbåt_ckunk = [[Wayfinder? &startId=`2` ..... ]], where 2 is the ID for the kategory (folder) Klinkbåt.

                  kravel_chunk = [[Wayfinder? &startId=`3` ..... ]], where 3 is the ID for the kategory (folder) Kravel.

                  Etc. and then use TVs in every dokument pointing to the right chunk. It works, but it’s not that elegant. And I was hoping it could be done more automatic. (ref: http://trebaat.net/index.php).
                    I think, thererfor I am! But what I am, and why...?
                    • 7923
                    • 4,213 Posts
                    It can be done the way I said and I don’t believe that it’s not working.. Are you sure the documents involved all use the same template? and they are structured like this:

                    Siteroot
                    * Klinkbåt
                    * Testside
                    * ny test
                    * Enda en testside
                    * Test for å se meny
                    * Tredjenivå
                    * Enda et element
                    * Tredje side
                    * Fjerde side

                    If all is correct, give me Manager access (via pm) and I’ll take a peek..


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 8562
                      • 4 Posts
                      I have same problem and for me using &startId=`[[UltimateParent]]` causes this problem

                      « MODx Parse Error »
                      MODx encountered the following error while attempting to parse the requested resource:
                      « Execution of a query to the database failed - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ’AND sc.published=1 AND sc.deleted=0 AND (sc.privateweb=0) AND s »
                      SQL: SELECT DISTINCT sc.id,sc.menutitle,sc.pagetitle,sc.introtext,sc.menuindex,sc.published,sc.hidemenu,sc.parent,sc.isfolder,sc.description,sc.alias,sc.longtitle,sc.type,if(sc.type=’reference’,sc.content,’’) as content, sc.template FROM `sanga`.sanga_1site_content sc LEFT JOIN `sanga`.sanga_1document_groups dg on dg.document = sc.id WHERE sc.parent = AND sc.published=1 AND sc.deleted=0 AND (sc.privateweb=0) AND sc.hidemenu = 0 GROUP BY sc.id ORDER BY sc.menuindex ASC;
                      [Copy SQL to ClipBoard]

                      Parser timing
                      MySQL: 0.0019 s s (8 Requests)
                      PHP: 0.0245 s s
                      Total: 0.0265 s s