We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3642
    • 48 Posts
    I am having a problem getting outerTpl to display an id. I’m using 0.9.6.1p2 and the Wayfinder that came with it.

    I have a chunk wfIbcTabCssId with the code set to
    <ul id="tablist">[+wf.wrapper+]</ul>

    I have a template variable ibcTabCss with
    Input Type == text
    Input Option Values == @CHUNK wfIbcTabCssId

    I have assigned ibcTabCss to my template.

    I have the following snippet in my template.
    <ul id="nested">[!Wayfinder?&startId=`0`&level=1&excludeDocs=`1,2`&removeNewLines=`true`&outerTpl=`ibcTabCss`!]</ul>

    I expect output similar to
    <ul id="nested"><ul id="tablist"><li><a href="/3.html" title="News" >News</a></li><li><a href="/4.html" title="Blogs" >Blogs</a></li></ul></ul>
    but am getting
    <ul id="nested"><ul><li><a href="/3.html" title="News" >News</a></li><li><a href="/4.html" title="Blogs" >Blogs</a></li></ul></ul>

    When I use QuickEdit to examine the value of ibcTabCss, it contains the expected value of <ul id="tablist">[+wf.wrapper+]</ul>

    So what am I overlooking here?

    Mike
      Michael Henderson
      MODxCMS + Dreamhost P/S + BBEdit
      Safari + Mac OS X 10.8
      • 18862
      • 70 Posts
      It looks like your problem is that your template variable is pointing to "wfIbcTabCssId" instead of "wfIbsTabCssId"
        • 3642
        • 48 Posts
        Thanks. I double checked my site and it is spelled correctly there. I corrected the typo in my original posting. Do you see anything else? It puzzles me because when I check the value of ibcTabCss in QuickEdit, it has the expected value. If I put the chunk directly into my page, it shows the expected value, too. What I can’t figure out is why Wayfinder appears to be rejecting &outerTpl=`ibcTabCss`. Is that the right syntax? The wrong syntax?

        Mike
          Michael Henderson
          MODxCMS + Dreamhost P/S + BBEdit
          Safari + Mac OS X 10.8
          • 3642
          • 48 Posts
          When I turn debug on, the output says "outerTpl - No template found, using default." So obviously I am mucking up the call to Wayfinder somehow. I think that I’m following the examples from the muddydogpaws site. Anybody see what I am missing?

          [!Wayfinder?&startId=`0`&level=1&excludeDocs=`1,2`&removeNewLines=`true`&outerTpl=`ibcTabCss`!]

          Even if I strip the call down to just

          [!Wayfinder? &debug=true &outerTpl=ibcTabCss !]

          I still get no template found.

          Mike
            Michael Henderson
            MODxCMS + Dreamhost P/S + BBEdit
            Safari + Mac OS X 10.8
            • 3642
            • 48 Posts
            I started looking through the wayfinder.inc.php file. Before the call to checkTemplates(), $this->_templates[’outerTpl’] contains ’ibcTabCss’. After, it contains ’[+wf.wrapper+]’. Digging in the the fetch() routine it looks like Wayfinder is expecting outerTpl to contain the name of a CHUNK, not a template variable. Is that correct?
              Michael Henderson
              MODxCMS + Dreamhost P/S + BBEdit
              Safari + Mac OS X 10.8
              • 3642
              • 48 Posts
              I have no frakin clue as to what Wayfinder is expecting. My chunk contains <ul id="tablist">[+wf.wrapper+]</ul>. The code for outerTpl strips every thing but the [+wf.wrapper+] out of the chunk. If I use the example code of
              <ul id="topnav"[+wf.classes+]>
              [+wf.wrapper+]
              </ul>
              it still strips out everything but the [+wf.wrapper+]. How the heck is this supposed to work?
                Michael Henderson
                MODxCMS + Dreamhost P/S + BBEdit
                Safari + Mac OS X 10.8
                • 3642
                • 48 Posts
                Unbelievable. The name Tpl led me think that it wanted a template variable. Wrong. The problem is that outerTpl requires a chunk. The documentation and example says that. Like a snake, though, it’s not obvious until it bites you.

                The next problem is that my call should have level=`1` not level=1. It doesn’t work the second way.
                  Michael Henderson
                  MODxCMS + Dreamhost P/S + BBEdit
                  Safari + Mac OS X 10.8
                  • 18862
                  • 70 Posts
                  It may work your original way if you put it as follows:

                  &outerTpl=`[*ibcTabCss*]` I was going to say something about that in my first post (the fact that it should be pointing to a chunk) but I thought maybe you knew more than I did and was intentionally trying to make it more dynamic via using a TV instead of hard coding to point to chunk.

                  Not sure why the documentation shows that you put [+templateVariable+] instead of [*templateVariable*]. I’ve tried it both ways and it only works with the [*tv*] syntax. (at least as far as the template chunks go. Again, not sure if it will work in the direct wayfinder call)
                    • 3642
                    • 48 Posts
                    Thanks for the suggestion. The humorous part of this is that I’m trying to write a tutorial for Wayfinder. I think that I ended up learning a lot more last night than I was planning. But, to give props, when I got it to work, it was beautiful :’(

                    Mike
                      Michael Henderson
                      MODxCMS + Dreamhost P/S + BBEdit
                      Safari + Mac OS X 10.8