Wayfinder has me in a state of overwhelming amazement — mainly overwhelmed at the moment though. Would someone please let me know if I am on the right track for setting up wayfinder to work with the Foundation 5 Sub-Nav.
My code below seems to be working, but I just thought I'd have someone else take a look to spot any potential issues, or provide a better method of accomplishing my goal.
I basically want a simple menu for only the pages in a single container. My container resource is "4" There are no drop menus associated with this navigation.
My wayfinder call is:
[[Wayfinder?
&startId=`4`
&outerTpl=`dh_subnav_outerTpl`
&rowTpl=`dh_subnav_rowTpl`
&outerClass=`sub-nav`
]]
Then I wrote an outerTpl and a rowTpl
<!-- dh_subnav_outerTpl -->
<dl id="roomsnav"[[+wf.classes]]">[[+wf.wrapper]]</dl>
<!-- dh_subnav_rowTpl -->
<dd[[+wf.id]][[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>[[+wf.wrapper]]</dd>
As mentioned. This seems to display and work ok. In the generated code, the commented out portion of the rowTpl gets inserted above each <dd></dd>.
Maybe that's normal.
At any rate, if someone could review this and let me know if there's a better way to handle it, I would greatly appreciate it.
I will have a couple of other containers that I will treat the same way.
Initially I tried using the includeDocs, but found that it seemed to be for including ONLY those docs. Thus, just setting the startId to my root container seemed a better solution. In that way, if the client adds another page—wayfinder will include it.
[ed. note: mmcgee last edited this post 12 years, 8 months ago.]