We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18338
    • 31 Posts
    I am trying to implement a simple template with WayFinder for the first time, and I seem to be missing something fundamental. My document tree is something like this:

    Site Root (0)
    -- Container 1 (2)
    -- Container 2 (3)
    ----Page 2-1 (5)
    ----Page 2-2 (6)
    ----Page 2-3 (7)

    Container 2 and each of its three children share a template. In this template, I would like a simple unordered list of site links which would include Container 2 and the three children. I call wayfinder with a startId of 3, and I get the three pages in the list but not the container. All of the pages are published and all are checkmarked for inclusion in the menu.

    For testing purposes, I set startId to 0 and I see Container 1, Container 2, and the three pages (which is not what I want). What am I missing?
      • 7231
      • 4,205 Posts
      You are looking for the &displayStart and &startItemTpl parameters:

      &displayStart
      default: FALSE
      values: [ TRUE | FALSE ]
      description: The displayStart parameter will cause Wayfinder to output the document used as the startId using the template startItemTpl. This parameter only works if the startId is not equal to zero. This functionality was added so that it is easy to add header to submenus.

      &startItemTpl
      default: see example
      values: name of template chunk
      description: The startItemTpl is used for templating the startId document when the parameter &displayStart is set to TRUE.
      available placeholders: Same as RowTpl.
      example:

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

      This is a link you need to bookmark, I still reference it all of the time when working with Wayfinder:
      http://www.muddydogpaws.com/development/wayfinder/parameters.html

        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 18338
        • 31 Posts
        Perfect - thank you very much.