We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21395
    • 91 Posts
    Wayfinder creates nested <ul>s, if you've got containers in your menu.

    Bootstrap, however, hasn't recognised nested <ul>s since V3, (according to one of the project members), and as a consequence my Wayfinder-generated bootstrap menus fail if I upgrade Bootstrap. Bootstrap manages submenus by adding a different class to the <li> that heads a sub-menu.

    I can't work out any way for Wayfinder to be used to generate a bootstrap-compatible <ul> with a special class for the sub-menu <li>s.

    Has anyone managed their way around this one?

    I'm on Revo 2.6.5, on MODX Cloud, so all the latest stuff.
      MODX Revolution 2.6.5-pl (traditional)

      Hosted on MODX Cloud

      Skype: nicbaldeagle
      • 54199
      • 108 Posts
        • 21395
        • 91 Posts
        Quote from: argonaut2k at Sep 14, 2018, 09:46 AM
        Just use templating https://docs.modx.com/extras/revo/wayfinder#Wayfinder-TemplateParameters

        I do use templating, but I am a bit puzzled as to how to use templating to stop Wayfinder generating the nested <ul> and associated <li> tags within the outermost <ul>. You wouldn't have an example of something of this nature would you? Hasn't got to be the same thing, but the example in the docs doesn't explain away my problem.

        I'm grateful for any further clues.
          MODX Revolution 2.6.5-pl (traditional)

          Hosted on MODX Cloud

          Skype: nicbaldeagle
          • 54199
          • 108 Posts
          Quote from: nicboyde at Sep 15, 2018, 07:51 PM
          Quote from: argonaut2k at Sep 14, 2018, 09:46 AM
          Just use templating https://docs.modx.com/extras/revo/wayfinder#Wayfinder-TemplateParameters

          I do use templating, but I am a bit puzzled as to how to use templating to stop Wayfinder generating the nested <ul> and associated <li> tags within the outermost <ul>. You wouldn't have an example of something of this nature would you? Hasn't got to be the same thing, but the example in the docs doesn't explain away my problem.

          I'm grateful for any further clues.</ul></li></ul>

          innerTpl is template for any subfolders and innerRowTpl template for the row items in a subfolder.

          Default innerTpl

          <ul[[+wf.classes]]>[[+wf.wrapper]]</ul>

          Default innerRowTpl

          <li[[+wf.id]][[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>[[+wf.wrapper]]</li>