We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    !!! fast !

    Didn’t even get the chance to test 1.5 tongue
    (Huge improvements BTW grin )
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 14050
      • 788 Posts
      This all sounds awesome. I can confirm that 2.0 does not use the parentTpl when the children are not shown in the menu. So that fixes the one problem I was encountering.
        Jesse R.
        Consider trying something new and extraordinary.
        Illinois Wine

        Have you considered donating to MODx lately?
        Donate now. Every contribution helps.
        • 10666
        • 68 Posts
        Wow ... the new features were just what I wanted(&includeDocs , &excludeDocs) tongue.I’m looking forward to testing this and post feedback over the next couple of days.
        PS:
        New template &startItemTpl - Used to format the output of the startId Doc if &displayStart is used. Defaults to <h2>[+linktext+]</h2>
        I would argue that putting linktext between h2 tags would not be an actual correct solution, not being semantically correct.H1,h2,hx tags should have a semantic meaning,and I don’t think it’s an appropriate default setting. The best thing to do would to have some css classes by default , and to introduce a css file dynamically on the page [only when wayfinder snippet is called,assuming that one might have pages with no menu] with the help of a parameter.
        This is a really great snippet , thanks for the hard work you put into it .
          • 15987
          • 786 Posts
          Quote from: Geo88 at Feb 21, 2007, 04:21 PM

          I would argue that putting linktext between h2 tags would not be an actual correct solution, not being semantically correct.H1,h2,hx tags should have a semantic meaning,and I don’t think it’s an appropriate default setting. The best thing to do would to have some css classes by default , and to introduce a css file dynamically on the page [only when wayfinder snippet is called,assuming that one might have pages with no menu] with the help of a parameter.
          This is a really great snippet , thanks for the hard work you put into it .

          I guess I could put it in a span or something, but really all that is doing is creating a heading for the menu, so that is why I choose an H2.
            • 15987
            • 786 Posts
            Behold the beauty of config files

            I have updated the zip at the first post with config files for all of the include examples. I also added the sliding doors technique example for a nice tab menu. So you may wonder how these work, well all you need to do is call wayfinder like the following:

            [[Wayfinder? &startId=`0` &config=`slidingdoors`]]
            


            And wallah, your menu appears like magic. With these config files you can set all of the parameters for wayfinder, including the templates, which should make it very easy to create easily distributable menu layouts.

            Enjoy
              • 8880
              • 29 Posts
              I would argue that putting linktext between h2 tags would not be an actual correct solution, not being semantically correct.H1,h2,hx tags should have a semantic meaning,and I don’t think it’s an appropriate default setting.

              I would have to counter that. Since the heading is a first-level menuitem, h2 seems to be a good choice.
              If you, f.e. use h1 for your branding, the main page in a branch of documents would be the logical next heading.

              But then, that is how I mark-up my content. wink
                • 8880
                • 29 Posts
                Would be nice to be able to hide the output from « &showSubDocCount », if the count is « 0 ».

                I could find a workaround, by adding the count to a CSS-class inside the « &rowTpl » Chunk:
                [tt]<span class="subitem_count_[+wf.subitemcount+]">[[+wf.subitemcount+]]</span>[/tt]

                and then hide the span in the CSS:
                [tt]span.subitem_count_0 {
                display: none; }[/tt]

                Is there a simpler or more elegant way of doing that?
                  • 15987
                  • 786 Posts
                  I can’t think of a better way to do that off of the top of my head. I will see if I can get something into the code for that.
                    • 15987
                    • 786 Posts
                    endif,
                    I actually just thought of a way to do it with the existing code. Since only folders (parents) will have children displayed in the menu, create a template for parentRowTpl and include the placeholder there and do not put it in the rowTpl.

                    the parent templates are only used if an item has children displayed in the menu so this should work.
                      • 7923
                      • 4,213 Posts
                      Time for some phx magic! laugh


                        "He can have a lollipop any time he wants to. That's what it means to be a programmer."