We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29125
    • 12 Posts
    I wrote a snippet to process the placeholder in this chunk:
    [+tocPrefix+] Page Title!

    and this works fine in the content area of my site pages.

    Next I created a chunk to serve as a Wayfinder "rowTpl" template as follows:
    <li[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]" >[+tocPrefix+][+wf.linktext+]</a> [+wf.wrapper+]</li>


    Where the Wayfinder call is:
    [!Wayfinder? &startId=`2` $rowTpl=`TocPrefixTpl` &debug=`true` &ignoreHidden=`true` &level=`1` &displayStart=`true`  &levelClass=`col2navlev`!]


    My problem is the &debug output shows "rowTpl - No template found, using default" which comes back with this format:
    <li[+wf.id+][+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a>[+wf.wrapper+]</li>

    So my question is, why doesn’t Wayfinder locate my chunk for the rowTpl? Also, must I call a snippet from Wayfinder rather than simply inserting a placeholder for the tocPrefix variable?
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      What’s the name of your Chunk? Exact spelling and capitalization matter I think...
        • 29125
        • 12 Posts
        The chunk is created in the resource manager with this name:

        TocPrefixTpl

        Category: Template

        I tried to see where MODx stores templates and chunks using my root login on the Linux server, but so far I haven’t figured out where the manager stores resources. The chunk persists so there should not be a file write error and there is no problem reading chunks or templates in general.
          • 3749
          • 24,544 Posts
          In your snippet call: $rowTpl --> &rowTpl. wink

          Don’t feel bad, we’ve all done it. smiley
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 29125
            • 12 Posts
            In your snippet call: $rowTpl --> &rowTpl.

            Thanks! Now my problem is getting wayfinder (or a snippet nested in the wayfinder process) to print the menuindex for each page in front of the menutitle field. Example:

            1. Parent MenuTitle
            1.1 Child MenuTitle
            1.2 Child MenuTitle

            specifically I don’t know how to cause wayfinder to process the menulevel fields 1., 1.1, 1.2 while building the menu.
              • 1343 ☆ A M B ☆
              • 2,213 Posts
              Take a look at this book it should help you through getting the desired results:
              http://modxcms.com/forums/index.php/topic,34176.0.html

                Patrick | Server Wrangler
                About Me: Website | Tweets |  MODX Hosting