We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31640
    • 100 Posts
    I am a newbie on modx. I am doing my first migration to modx and it seems very promising. I really like it a lot.

    But i have a lot off chunks. I want to do it more dynamic.
    So my menu is also a chunk at this moment. I filled in the id’s myself.

    Little example...

    <div class="navigation">
    <a href="index.php?id=1&amp;s=1" id=’active’>Home</a>
    <a href="index.php?id=2&amp;s=2&amp;n=1" >Samengesteld Parket</a>
    <a href="index.php?id=3&amp;s=2&amp;n=2" >Traditioneel Parket</a>
    <a href="index.php?id=4&amp;s=1" >Di Legno</a>
    <a href="index.php?id=5&amp;s=1" >Parky</a>
    <a href="index.php?id=6&amp;s=1" >Laminaat</a>
    <a href="index.php?id=7&amp;s=2&amp;n=3" >Parket Waaslandia</a>
    <a href="index.php?id=8&amp;s=1" >Contact</a>
    <div class="clearer"></div>

    I want to make it dynamic and controlled by modx
    Can i do this with wayfinder??? Because i read that wayfinder uses the <li> to make his menu’s
    and this is a basic menu with no special effects
    Or is there another way??

    Another option can be rewriting my current menu that it uses <li>

    Can you give me any advise please
      • 16183
      • 1,390 Posts
      Hi,

      Welcome to modx

      Yes, use Wayfinder. It will automatically do the <li> for you, which is a good thing coz you really want that menu to be <li>. Since you’ve read about Wayfinder I suppose you know where its resources are? if not here are some of them:

      http://www.muddydogpaws.com/development/wayfinder/features.html
      http://wiki.modxcms.com/index.php/Wayfinder
      http://modxcms.com/forums/index.php/board,182.0.html

      cheers/k  smiley

        • 31640
        • 100 Posts
        this implies a css modification smiley

        i was rather lazy and hoped for a solution with no modification at all grin
          • 3749
          • 24,544 Posts
          In theory, you could use wayfinder parameters to invoke your current CSS, but it’s probably easier to use the premade Wayfinder CSS files. On the plus side, once you have Wayfinder working the way you want, you should never have to touch your menu again.  smiley

          PS: See the site in my sig for info on how MODx works.
            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
            • 7231
            • 4,205 Posts
            this implies a css modification
            Wrong. Wayfinder can adapt to this output easily. All you would need is a custom &outerTpl and &rowTpl. That is it, no changes to CSS needed. Most everything in MODx will adapt to the desired output format wink

            &outerTpl:
            <div class="navigation">
               [+wf.wrapper+]
            <div class="clearer"></div>


            &rowTpl:
            <a href="[+wf.link+]" id="[+wf.classnames+]">[+wf.linktext+]</a>
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don&#39;t know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 31640
              • 100 Posts
              I succeeded in creating my first wayfinder menu

              BUT

              Still one problem.
              It can’t set the css to the active item in the menu.

              My site structure isn’t basic...

              Its like this:
              I have a basic layout and at the top there is a wayfinder menu
              then there are two options depending on the choise in the top menu

              One-column layout without navigation
              Or a two-column layout with subnavigation

              I created my own snippet to make this happen
              and it works just fine

              The only thing that i don’t succeed in, is to make
              add the active css to my top navigation items..
              And is it possible with wayfinder that when i click on a submenu link
              that main navigation links gets the active css???

              I hope you guys have a solution
                • 31640
                • 100 Posts
                Somebody?
                  • 27374
                  • 6 Posts
                  I am also doing something similar. The main layout contain logo, main menu, footer, etc.

                  The content layout varies slightly for different sections. I make a template for each of them and choose which template to use when adding documents/pages.

                  1. Single column layout
                  blank & max flexibility, all contents in it are customised one by one myself.

                  2. columns layout
                  submenu on the side called with [!Wayfinder? &startId=`[[UltimateParent]]` &hideSubMenus=`1`!]
                  adverts etc

                  3. blog (haven’t done this part yet)
                  similar to columns layout but the navigation is categorised by date, tags, etc rather than Wayfinder call.

                  And all are css styled.