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

    I’ve a problem with a recursive call of the wayfinder snippet.

    Given the following site structure


    • Page1
    • Page2[list]
      [li]Page2.1
    • Page2.2[list]
      [li]Page2.2.1
    • Page2.2.2
    • Page2.2.3
    • Page2.2.4
    [/li]
    [li]Page2.3[/li]
    [/list][/li]
    [li]Page3[/li]
    [li]Page4

    • Page4.1
    • Page4.2
    [/li]
    [/list]

    I want to show an extended breadcrumb navigation with the help of wayfinder.

    For example if the vistor is on page Page2.2.3 the breadcrumb navigation should look like this:

    <dl>
    	<dt>You are here:</dt>
    
    	<dd>
    		<a href="page2.html">Page2</a>
    		<div>
    			<ul>
    				<li><a href="page2.1.html">Page2.1</a></li>
    				<li><a href="page2.2.html">Page2.2</a></li>
    			</ul>
    		</div>
    	</dd>
    	<dd>
    		<a href="page2.html">Page2.2</a>
    		<div>
    			<ul>
    				<li><a href="page2.2.1html">Page2.2.1</a></li>
    				<li><a href="page2.2.2html">Page2.2.2</a></li>
    				<li><a href="page2.2.3html">Page2.2.3</a></li>
    				<li><a href="page2.2.4html">Page2.2.4</a></li>
    			</ul>
    		</div>
    	</dd>
    	<dd><a href="page2.2.3html" class="active">Page2.2.3</a></dd>
    </dl>
    


    This list will be styled via css so that the vistor sees

    You are here: > Page2 > Page2.2 > Page2.2.3

    On mouseover the subpages (the ULs from above) should be displayed.

    As far as I understand, this is not possible in Wayfinder without a recursiv call of the snippet.

    My problem is this recursive call in the activeParentRowTpl:

    <dd>
    	<a href="[[+wf.link]]">[[+wf.linktext]]</a>
    	<div>
    		[[Wayfinder? 
    			&startId=`[[+wf.docid]]`
    			&titleOfLinks=`menutitle`
    			&level=`1`
    			]]
    	</div>
    </dd>
    [[+wf.wrapper]]
    


    &startId=`[[+wf.docid]]`

    Seems not to work. How can I pass the startId to the Wayfinder snippet within a Wayfinder template by using the id of the current document stored in the [[+wf.docid]] placeholder?

    I hope you’re able to understand my problem (sorry for my bad English).
      Add-On to easily manage your multilingual sites: Babel
      • 19534
      • 183 Posts
      Ok, I found the solution by my self. The problem was caused by the cache. Simply adding a ! to the inner Wayfinder call solved my problem:

      [[!Wayfinder? 
      	&startId=`[[+wf.docid]]`
      	&titleOfLinks=`menutitle`
      	&level=`1`
      ]]
      


      This works as desired!

      Thank you any way!
        Add-On to easily manage your multilingual sites: Babel