Can't get Wayfinder categoryFoldersTpl to work


I’m trying to get categoryFoldersTpl to work. I’ve followed the instructions in the pdf “Using Wayfinder.pdf” on sottwell -dot- com (forum wont let me post a link).

Step to reproduce

I’ve created a chunk for the category folder named “navCategoryHeadings”. The chunk contains this text.

<li class=“menuheading”>[+wf.linktext+][+wf.wrapper+]</li>

My Wayfinder call is as follows.

[[Wayfinder? &categoryFoldersTpl=`navCategoryHeadings` &startId=`1` &depth=`3`]]

The documents that are suppose to be categories (and not links) have children documents, have the “Uses Template” field set to “(empty)” or “Link Attributes” set to ‘rel=“category”’ (I’ve tried both). I’ve also tried creating a Static Resource.

I can’t think of what else I’m missing.

Observed behavior

The parent documents have tags (it’s not using the navCategoryHeadings chunk).

Expected behavior

The parent documents shouldn’t have tags


MODX 2.6.5-pl, Wayfinder 2.3.3-pl, CentOS 7, Apache/2.4.35, MySQL Ver 14.14 Distrib 5.7.23. Safari/Firefox on Mac OS X 10.12.

1 Like

The tag syntax you’re using, [+wf.linktext+], belongs to Evolution. As you’re running Revolution, that’s not going to work.

Wayfinder for Evo and Revo are pretty similar, so you might just need to change [+key+] to [[+key]] to resolve it:

<li class="menuheading">[[+wf.linktext][[+wf.wrapper]]</li>

I fixed that. It still doesn’t work. I enabled debugging and here is the output. It looks like everything should work. My next step is to modify the source code and see if I can figure it out, which I’m not exactly looking forward to. The item that should be a category is doc 11.

Wrapper for items with parent 1. - These fields were used when processing the wrapper for the following resources:

template outerTpl

Documents included in this wrapper:

Doc: #11

The following fields were used when processing this document.

template rowTpl
document document
text/html text/html
Blog Blog
blog blog
rel=“category” rel=“category”
1 1
2019-01-25 19:04:07 2019-01-25 19:04:07
2019-04-13 08:36:21 2019-04-13 08:36:21
2019-03-22 21:13:00 2019-03-22 21:13:00
modDocument modDocument
web web
blog.html blog.html
[[+wf.wrapper.11]] [[+wf.wrapper.11]]
class=“last” class=“last”
last last
11 11

The following fields were retrieved from the database for this document.

id 11
type document
contentType text/html
pagetitle Blog
alias blog
link_attributes rel=“category”
published true
parent 1
isfolder false
richtext true
menuindex 1
searchable true
cacheable true
createdby 1
createdon 2019-01-25 19:04:07
editedby 1
editedon 2019-04-13 08:36:21
deleted false
publishedon 2019-03-22 21:13:00
publishedby 1
donthit false
privateweb false
privatemgr false
hidemenu false
class_key modDocument
context_key web
content_type 1
uri blog.html
show_in_tree 1
protected false
link blog.html
level 1
linktext Blog
title Blog
last 1
hasChildren 1

Wrapper for items with parent 11. - These fields were used when processing the wrapper for the following resources:

template outerTpl

Ha. I stared at the code above for a long time (ok, 3 minutes) and saw “isfolder false” and wondered if that had anything to do with it so I found the “Container” settings for the page and checked it and now it works.



This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.