We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13736
    • 345 Posts
    Whenever I implement the &displayStart parameter it seems to turn off the wayfinder output completely. It doesn’t matter if I have it set to TRUE or FALSE. But removing the parameter lets the &outerTpl and &rowTpl chunks show as they should. However the &startItemTpl chunk doesn’t show. Am I doing something wrong?



    I have a Wayfinder call like this...
    [!Wayfinder? &startId=`[*menu-variable*]` &level=`1` &displayStart=`TRUE` &startItemTpl=`psSidebar2_HeaderNav` &outerTpl=`psSidebar2_OuterNav` &rowTpl=`psSidebar2_RowNav`!]


    Then I have three templates for my menu.


    &startItemTpl=`psSidebar2_HeaderNav` for the header or outer container to my menu.
    <div id="navbar2">
    	<div id="navbar2-title">[+linktext+]</div>
    	[+wf.wrapper+]
    	<div id="navbar2-bottom">
    	</div>
    </div>



    &outerTpl=`psSidebar2_OuterNav` for the outer UL tag
    <ul id="navbar2-menu">[+wf.wrapper+]</ul>



    &rowTpl=`psSidebar2_RowNav` for the LI tags
    <li class="category [+wf.classnames+]"><a href="[+wf.link+]" title="[+wf.title+]"><span class="link_title">[+wf.linktext+]</span><br /><span class="link_desc">[+wf.description+]</span></a>[+wf.wrapper+]</li>



    Does the OuterTpl and startItemTpl work at the same time? I couldn’t find documentation that told which had priority.






      • 7231
      • 4,205 Posts
      Template Processing Order

      1. startItemTpl
      2. parentRowHereTpl
      3. innerHereTpl
      4. hereTpl
      5. activeParentRowTpl
      6. categoryFoldersTpl
      7. parentRowTpl
      8. innerRowTpl
      9. rowTpl
      I have used the startItemTpl without any problems before and I don’t see any reason for it not working.... I have never used it with a complex template, I have only used it with templates similar to the example, maybe it can’t handle a complex template (just guessing here). Just out of curiosity try a simple tpl just to test it.
        [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]
        • 13736
        • 345 Posts
        That the list you pasted doesn’t show the outerTpl. Where does that fall into the mix?

        And when you say try a simple tpl, what does that mean? The final output I’m aiming without the CSS is this...

        <div>
           <div>Container Header and Title</div>
           <ul>
              <li><a href="#"><span >Link Text</span><br /><span>Link Description</span></a></li>
              <li><a href="#"><span >Link Text</span><br /><span>Link Description</span></a></li>
              <li><a href="#"><span >Link Text</span><br /><span>Link Description</span></a></li>
           </ul>
           <div>Container Footer</div>
        </div>
        



        The main thing I was trying to accomplish and the reason for trying the startItemTpl was to insert the page title of the document that Wayfinder was pulling from. It didn’t seem to do anything in the outerTpl.
          • 13736
          • 345 Posts
          I looked around before ever posting on this forum to find a working example of the &startItemTpl in use and see where the output falls in the list. Couldn’t find one. Do you have a working example and what the snippet call looks like?

            • 7231
            • 4,205 Posts
            That the list you pasted doesn’t show the outerTpl. Where does that fall into the mix?
            Duhh, you are right the outer is not there, that is odd. I assumed it was and saw things that did not exist, sorry, that was no help at all.

            I ran your code and there is a simple error that we both missed. The problem is here in the startItemTpl:
            <div id="navbar2-title">[+linktext+]</div>


            [+linktext+] should be [+wf.linktext+]
              [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]
              • 13736
              • 345 Posts
              Ok. Still didn’t fix the problem. So maybe I can think about it another way if the &displayStart parameter won’t work.

              The easy part, I need to use wayfinder to make a list from Document # 42 (or another optional document) which is not a child of the current page. Example on the right column here http://test.pixelstuff.com/resources.html

              But then I need to insert the title of document # 42 into the header of this Wayfinder list. So far I haven’t found a tag that works. The wf.linktext doesn’t seem to insert anything. As you might can see on this page (right column) where I have the wf.linktext tag right before the word Text. Inside the DIV called

              <div id="navbar2-title">[+wf.linktext+] Text</div>



                • 7231
                • 4,205 Posts
                Try it with the GetField snippet and you can simply use the outerTpl no need for the startItemTpl:
                <div id="navbar2-title">[[GetField? &parent=`1` &field=`pagetitle`]]</div>


                With the GetField snippet we can use any filed including template variables. Note in the call above &parent=`1` means get the current document parent.

                # $parent [ 0 | 1 ]
                # If set to 1, the snippet will return value for the document parent.
                # Default: 0

                http://modxcms.com/getField-1.3-beta-1189.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]
                  • 13736
                  • 345 Posts
                  Thank you. That works great. How did I miss the getField snippet.

                    • 7231
                    • 4,205 Posts
                    Good to hear it is working. I recently discovered that I could use GetField together with wayfinder to get access to all the document and template variables.
                      [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]