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

    ... lose the extra ampersand inside the parameter value.

    Tried that, makes no difference.

    [!Wayfinder? &startId=`63` &displayStart=`1` &startItemTpl=`startItemTpl` &ignoreHidden=`0` &level=`3` !]


    Just get a blank screen.

    I’m just trying to get a basic list of the container and it’s documents. The base call is
    [!Wayfinder? &startId=`63` &ignoreHidden=`0` &level=`3` !]
    which works fine except it leaves out the Start/Title of the container.

    Adding the extra call makes it go blank.

    Are there other chunks that need to be created or is this the only one that’s needed?

    Thanks
      Content Creator and Copywriter
      • 16183
      • 1,390 Posts
      Are there other chunks that need to be created or is this the only one that’s needed?

      EDIT: SEE NEXT POST FOR SOLUTION: PROBLEM WAS &ignoreHidden

      I should have thought there aren’t.

      As I explain below, wayfinder always requires outerTpl, rowTpl and if displayStart is set to true, startItemTpl and it has inbuilt defaults for these. So, if you don’t specify them, (the defaults) your call should still work since wayfinder will revert to its default ones. I tried it and it works for me. I tried this on the modx demo site:

      [!Wayfinder? &startId=`39` &displayStart=`1` &ignoreHidden=`0` &level=`3` !]


      I get a menu with the menu title of document 39 (Templates) being shown as the title of my menu and sub-menus shown below, MODxHost, MODxCSS Wide, MODxCSS (child docs of doc 39).

      You see in the above, no chunks are specified, so wayfinder used the inbuilt default ones (outerTpl, rowTpl and startItemTpl [since displayStart is set to true, i.e. = 1]).

      Here is how things work the way I understand it (sorry this is going to be a long one but it might help clarify things for others).

      MODIFIED QUOTE (from the zipped wayfinder HTML documentation in the wiki)

      WayFinder can use up to eleven templates to define how to structure the various portions of its output, and it provides a corresponding set of parameters through which you can define each one. Of the eleven possible templates only two are absolutely required.

      The &outerTpl template is one of the two templates that are always required. This template provides the outer "container" for the rows that comprise the menu -- which are all placed in this template’s [+wf.wrapper+] placeholder (so don’t forget to include it).

      The other is &rowTpl.. For each document that WayFinder needs to list in the generated output, a "row" is generated. By default the &rowTpl template is used to construct these rows.

      Please note that there are a variety of row-level templates that can be used to produce different row output under different conditions. Each of these that you choose to specify will be used instead of the generic &rowTpl template when a document meets certain criteria, e.g.: has children (&parentTpl). But the bottom line is that something has to be defined for the row level templates

      WayFinder has built-in defaults for the above two required templates and uses them to construct the indented, unordered list that is produced by default. And if &displayStart is set to TRUE a third template joins the minimum-required set, and WayFinder has a built-in default for that too; the &startItemTpl

      Think of these in HTML terms. To construct an unordered list, you need at least two HTML elements; the <ul> and <li>.

      The &outerTpl is the outermost/container <ul>.

      The &rowTpl (or other row level templates such us innerRowTpl) will form the <li>.

      And if displayStart is set to true, you will also need the &startItemTpl.

      You will notice that it is only these three that Wayfinder has defaults for.

      The default &startItemTpl template is:

          <h2>[+wf.linktext+]</h2>[+wf.wrapper+]

      The default &rowTpl template is:

          <li [+wf.id+] [+wf.classes+] >
          <a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a>
          [+wf.wrapper+]
          </li>

      The default &outerTpl template is:

          <ul [+wf.classes+]>
          [+wf.wrapper+]
          </ul>

      Also note that when other similar templates such as innerTpl (container for sub-menus) are not defined, wayfinder will fall back to using it’s defaults. E.g., if no innerTpl is found, wayfinder will use ther outerTpl as the sub-menu container.

      Also, as mentioned above, remember that: since in your case &displayStart parameter is set to TRUE, then WayFinder will place the output of &outerTpl (which contains the entire menu structure!) into the [+wf.wrapper+] placeholder of the &startItemTpl, so be sure to include this placeholder in your custom template! (assuming you make one)

      So, back to your menu. Again, like I said, if you don’t specify the required tpls (outerTpl and rowTpl, and startItemTpl (if you are using displayStart = true), then your menu should still work/show with wayfinder using its inbuilt default tpls mentioned above.

      However, If you want to specify your own outerTpl and rowTpl you can do so.

      Am not sure why your code is not working. If am wrong about anything anyone, please correct me, thanks.

      cheers/f
        • 16183
        • 1,390 Posts
        OK, I think I found the problem and the solution  grin

        you have
        &ignoreHidden=`0`


        That means it is set to false, meaning you are telling wayfinder to ignore hidden items. In your case, your document with id 63 which is a container is set not to show in the menu. So, in order for wayfinder to show it you need to have

        &ignoreHidden=`1`


        Meaning, set to true. Since your container document 63 is set to be hidden from menu, if you use ignore hidden = true, it will show. So, the ignore is basically telling wayfinder to ignore the fact that it is set not to show in the menu

        Quote from muddydogpaws
        With this (&ignoreHidden) parameter set to TRUE, all documents will be displayed regardless of the Display in Menu flag.

        I have tested again at the demo site. I set both the container 39 and one of it’s child documents to "not show in the menu".
        Using ignoreHidden =`0`, if the container is set "not to show in menu" results in a blank document like in your case above. If only the child is set "not to show" in menu then I the menu displays but without that child document. However, seting ignoreHidden=`1` both child and container display in the menu despite their display flag being "do not show in menu".
        Try it. It works.. laugh

        so, the below code should work and wayfinder will use it’s three in-built default templates since I haven’t specified any (i.e., I haven’t created any custom chunks):

        [!Wayfinder? &startId=`63` &displayStart=`1` &ignoreHidden=`1` &level=`3` !]


        cheers/k
          • 18367
          • 834 Posts
          Kogondo,

          many thanks, it is working now. grin
            Content Creator and Copywriter
            • 16183
            • 1,390 Posts
            Brilliant!