We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21477
    • 25 Posts
    Hi,
    This is the first time I have ever developed a site without using someone else’s templates.
    my chunk
    <ul class="NoBulletNoIndent">
    <li[+wf.classes+]>
      <a class="ullink" href="[+wf.link+]" title="[+wf.title+]"><em>[+wf.linktext+]</em>
      </a>[+wf.wrapper+]
    </li>
    </ul>

    It is doing nothing other than producing a standard list.
    I am calling it from
    [!Wayfinder?startId=`0` &hereClass=`selected` &outerTpl=`my.OuterTpl`!]

    and the CSS is:
    ul.NoBulletNoIndent {
      list-style-type: none;
      margin-left: 0px;
      padding-left: 0px; color:#FFFFFF 
    }
    
    a.ullink {
    	color: #FFFFFF;
    	font-weight: bold;
    	text-decoration: none;
    }
    a:hover.ullink {
    	color: #FFA405;
    	text-decoration: underline;
    }


    Is this correct - and will the sub menus not show until the parent is selected?
    Is there a way to highlight the current link?
    This is the first time I have created any CSS from scratch - so please be gentle. smiley
      • 27305
      • 173 Posts
      Not sure if this will fix it but change your my.OuterTpl chunk to

      <ul class="NoBulletNoIndent">
      [+wf.wrapper+]
      </ul>


      Add another chunk for the <li></li> call it my.RowTpl and add

      <li[+wf.classes+]>
        <a class="ullink" href="[+wf.link+]" title="[+wf.title+]"><em>[+wf.linktext+]</em>
        </a>[+wf.wrapper+]
      </li>


      change the call to

      [!Wayfinder?startId=`0` &hereClass=`selected` &outerTpl=`my.OuterTpl` &rowTpl=`my.rowTpl` !]
        I made my first site with modx
        ------------------------
        Shopping blog
        Sky+ HD
        • 21477
        • 25 Posts
        Quote from: simonok at Sep 02, 2008, 08:26 AM

        Not sure if this will fix it but change your my.OuterTpl chunk to

        <SNIP>
        That’s further than I have got so far Thank you very much - been spending hours on this and not got any further to understanding what I am doing .
        I want to add a different style and an indent to to the List sub items.
        ie:
        MENU 1
            - Menu 1:1
            - Menu 1:2

        Is it also possible to have the current menu/page item in a different style? 
        I think its done by &hereClass=`here`
        is here a chunk? or is a class defined in the CSS file?
          • 16183
          • 1,390 Posts
          Quote from: nidave at Sep 02, 2008, 03:27 PM


          That’s further than I have got so far Thank you very much - been spending hours on this and not got any further to understanding what I am doing . I want to add a different style and an indent to to the List sub items.
          ie:
          MENU 1
              - Menu 1:1
              - Menu 1:2

          Nidave, have you looked at the downloable wayfinder documentation from the wiki? It really is quite exhaustive with very good explanations about wayfinder version 2. You can get it here: http://wiki.modxcms.com/index.php/Wayfinder200. (see toward top of page)

          Basically, wayfinder will generate an unordered list that will be indented to match any heirarchy present in the MODx document tree. The unordered lists are styled through your CSS.


          Is it also possible to have the current menu/page item in a different style? 
          I think its done by &hereClass=`here`
          is here a chunk? or is a class defined in the CSS file?

          Yes it is possible. My rule of thumb to remember what is a chunk and what is not is that: if it has anything to do with tpl (template), then it is a chunk  grin. eg. outertpl. Obviously the chunk will/can have place holders for CSS classes. However, remember that the CSS classes you reference in your wayfinder snippet call must also be present in your CSS file. So, to answer your question, if you have the class `here` like so....
          &hereClass=`here` 
          in your wayfinder call, then in your CSS you must have a class called here.

          Good luck! Am no expert, just learning more and more everyday

          /k