We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5393
    • 63 Posts
    hi:

    I try to create 2 wayfinder and I want those menus buttons to be in the same row. how to do that?

    [[Wayfinder?&startId=`28`&includeDocs=`40,45`]]
    [[Wayfinder?&startId=`0`&includeDocs=`56,59,58`]]

    thanks
    ernest

      • 8609
      • 607 Posts
      Off the top of my head I imagine one way to do this would be to set up your outerTpl for the two calls to ensure one opens the unordered list and the other one closes it. Remember that each Wayfinder call simply spits out an unordered list unless you template it otherwise. Some reading: http://rtfm.modx.com/display/ADDON/Wayfinder
        • 3749
        • 24,544 Posts
        You might also set up the Wayfinder div CSS to display: inline instead of display:block. Not sure if it would work.
          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
          • 5393
          • 63 Posts
          I set up the Wayfinder div CSS to display: inline and it doesn’t work. I still get 2 rows of menu.

          I think setting up outerTpl for 2 calls make sense. I will try to set it up and see what happen. Thanks.

            • 36404
            • 307 Posts
            hi,

            you could keep wayfinder ul li basic template and set dipslay: block; float: left; for the uls

            to bad you (we...) still have to deal with older versions of IE else, display: inline-block would have been a better and more semantic solution but well, let’s wait for ie 6/7 to die...

            have swing
              réfléchir avant d'agir
              • 9995
              • 1,613 Posts
              u can use &RowTpl’s etc. and modify these.

              so ur call would look like:

              <div id="nav">
                <ul>
                  [[Wayfinder?&startId=`28`&includeDocs=`40,45` &outerTpl=`OuterTpl` &innerTpl=`InnerTpl` &rowTpl=`RowTpl` &innerRowTpl=`InnerRowTpl` &level=`1`!]
                  [[Wayfinder?&startId=`0`&includeDocs=`56,59,58` &outerTpl=`OuterTpl` &innerTpl=`InnerTpl` &rowTpl=`RowTpl` &innerRowTpl=`InnerRowTpl` &level=`1`!]
                </ul>
              </div>


              Your chunks looks some like:

              {{InnerRowTpl}}
              <li[+wf.classes+]><a href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>
              
              {{InnerTpl}}
              [+wf.wrapper+]
              
              {{OuterTpl}}
              [+wf.wrapper+]
              
              {{RowTpl}}
              <li class="[+wf.classnames+]"><a href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>


              So there are no <ul> ’s generated and u add them yourself.



                Evolution user, I like the back-end speed and simplicity smiley
                • 5393
                • 63 Posts
                After creating 4 wayfinder chunks, I add the wayfinder code to the footer for modx revo:

                <div class="footer">
                <ul>
                [[Wayfinder?&startId=`28`&includeDocs=`40,45` &outerTpl=`OuterTpl` &innerTpl=`InnerTpl` &rowTpl=`RowTpl` &innerRowTpl=`InnerRowTpl` &level=`1`]]
                [[Wayfinder?&startId=`0`&includeDocs=`56,59,58` &outerTpl=`OuterTpl` &innerTpl=`InnerTpl` &rowTpl=`RowTpl` &innerRowTpl=`InnerRowTpl` &level=`1`]]
                </ul>
                </div>

                what I get in the end in my screen is:
                [+wf.wrapper+] [+wf.wrapper+]

                anything wrong in my code?
                thanks for your help. I am a mod newbie and come from design background. Thanks.

                Ernest


                  • 5393
                  • 63 Posts
                  I don’t think display:block would work because "display block" will generate a block box (a line break before and after the element)..

                  what I actually want is that every menu is displayed in a single row.

                  thanks.
                    • 36404
                    • 307 Posts
                    hi,

                    hi, display: block; float: left; will have your tow blocks on the same "line"
                    it’s not the best practice semanticaly speaking, inline-block would be better but, as i said, we’ll have to wait a little before we can use it

                    have swing
                      réfléchir avant d'agir
                      • 22427
                      • 793 Posts
                      ... for modx revo
                      what I get in the end in my screen is:
                      [+wf.wrapper+] [+wf.wrapper+]
                      You have to observe that the syntax of the placeholders has changed in Revo: Instead of [tt][+wf.wrapper+][/tt] it should be [tt][[+wf.wrapper]][/tt] .