We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9728
    • 25 Posts
    hey again!

    since hours and hours i’m trying to understand the wayfinder so i can effectively use it for my purposes. there are some things i just don’t understand and cannot find in the documentation (muddydogpaws.com/modxcms.com).


    ok, here’s the code i use in my template:
    [[Wayfinder? 
    
    	&startId=`0` 
    	&level=`2` 
    	&parentClass=`hide` 
    	&parentRowTpl=`wfParentRow` 
    	&outerTpl=`wfOuter` 
    	&innerTpl=`wfInner` 
    	&rowTpl=`wfRow` 
    	&outerClass=`menu` 
    	
    ]]
    


    the css for now is implemented directly into my template and looks like this:
    /* ================================================================ 
    This copyright notice must be untouched at all times.
    
    The original version of this stylesheet and the associated (x)html
    is available at http://www.cssplay.co.uk/menus/simple_dropline.html
    Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
    This stylesheet and the associated (x)html may be modified in any 
    way to fit your requirements.
    =================================================================== */
    /* for this demo only */
    #menu {margin:20px 0 80px 0;}
    
    /* the styling */
    #menu {width:750px; height:20px; background:#000; position:relative;}
    
    #menu .select, #menu .current {margin:0; padding:0; list-style:none;}
    
    #menu li {display:inline; margin:0; padding:0; height:auto;}
    
    #menu .select a,
    #menu .current a {display:block; height:20px; float:left; background:#000; padding:0 10px 0 10px; text-decoration:none; font-size:12px; line-height:20px; white-space:nowrap; border-right:1px solid #fff; color:#fff;}
    * html #menu .select a, * html #menu .current a {width:1px; height:21px;}
    
    
    #menu .select a:hover, 
    #menu .select li:hover a {background:#888; cursor:pointer; color:#ff0;}
    
    #menu .sub {display:none;}
    
    /* for IE5.5 and IE6 only */
    #menu table {position:absolute; border-collapse:collapse; left:0; top:0;}
    
    #menu .current a {background:#666; color:#ff0;}
    
    
    #menu .sub li a:hover, 
    #menu .select a:hover .sub li a:hover, 
    #menu .select li:hover .sub li a:hover {background:#888; color:#ff0;}
    
    #menu .sub_active .current_sub a, 
    #menu .sub_active a:hover {background:#666; color:#ff0;}
    
    #menu .select li a:hover .sub, 
    #menu .select li:hover .sub {display:block; position:absolute; width:750px; top:20px; left:0; background:#888; margin-top:0; padding:0; z-index:100; color:#fff; font-size:11px;}
    
    #menu .sub, #menu .sub_active {margin:0; padding:0; list-style:none;}
    
    #menu .sub_active {display:block; position:absolute; width:750px; top:20px; left:0; background:#666; margin-top:0; padding:0; z-index:10;}
    * html #menu .sub_active, * html #menu .select a:hover .sub {z-index:-1; margin-top:0; margin-t\op:1px;}
    
    #menu .sub_active a {height:21px; text-decoration:none; line-height:20px; white-space:nowrap; display:block; float:left; background:#666; padding:5px 10px 10px 10px; margin:0; font-size:12px; white-space:nowrap; border:0; color:#fff;}
    
    #menu .select a:hover .sub li a, 
    #menu .select li:hover .sub li a {display:block; background:#888; padding:5px 10px 10px 10px; margin:0; white-space:nowrap; border:0; color:#fff; font-size:12px;}


    and this is an excerpt of the generated page:
    <div class="navigation" id="navigation">
    	<div class="menu">
    		<ul>
    			<li class="active"><a href="http://localhost:8888/modx/" title="Vanga Testsite 1">testsite1</a></li>
    			<li><a  class="hide" href="/modx/index.php?id=3" title="Vanga Testsite 2">testsite2</a>
    				<ul>
    					<li><a href="/modx/index.php?id=6" title="submenu level 2">submenu 2</a></li>
    				</ul>
    			</li>
    			<li class="last"><a href="/modx/index.php?id=4" title="Vanga Testsite 3">testsite3</a></li>
    		</ul>
    	</div>
    </div> 



    what i don’t get is where classes like "active" or "hide" are coming from? and what the do?

    i really try to understand it but cannot sort it out :-(

    best
    firewireflow
      • 27708 MODX Staff
      • 2,502 Posts
      These classes come from Wayfinder’s built in templates. You can build your own templates using chunks. One thing that should be mentioned is that your snippet call should be all on one line as linebreaks and such could cause problems (disregard this if you added linebreaks for ease of reading on the forums).

      Class active is to allow you to style the <li> for the document currently being viewed (if you are at the level). The hide class is to enable the links within the dropdown not to be visible while not active.

      Is there something you would like to accomplish that you can’t?

      All the best,

      Jay
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 9728
        • 25 Posts
        hey jay!

        thanks for your quick answer! yes ... i would like to achieve something specific. like i said in a former posting i try to make the cssplay simple dropline menu work within the wayfinder.

        i don’t want to be harsh but if you could help me with that i would truly appreciate it. its all very confusing for me.

        [email protected] is my private email address. contact me if you got time and the will to help me trough this smiley

        thanks a lot
        best
        firewireflow
          • 27708 MODX Staff
          • 2,502 Posts
          I’d rather keep it in forum as these are helpful for other people.

          First, do you have a link to your output or could you post a screen cap?

          Did you get the CSS play templates from Muddydogpaws or from CSSPlay?

          Is your wayfinder call all on one line? It won’t work 100% if it isn’t. Depending on your stack and charecter set may not work at all. Obviously it is working but it is not clear from your OP what problem you are having.

          Did you look through the Wayfinder Docs on building the Dropline: http://www.muddydogpaws.com/development/wayfinder/examples/example-3.html. You will need to have all the chunks with the specific formatting and called from your wayfinder call. This is a very complex menu (its usefulness or lack thereof aside) and causes problems for many of us.

          I’ll be ready to give more help when I have additional info.

          Cheers,

          Jay
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
            • 9728
            • 25 Posts
            hey jay! thanks for your answer. yes i saw the dropline menu on muddydogpaws. i implemented it in my template and it worked great. then i was trying to modify it a bit. my goal was to make the second row (the one with the submenus) visible at all time but unfortunately i couldn’t figure it out. it was just too complex for me. so i decided to do it from scratch (with help of the forum of course).

            what do you think?

            best
            firewireflow
              • 27708 MODX Staff
              • 2,502 Posts
              If you want the second row visible all the time you could just use a second wayfinder call and reference the parent. You can easily use multiple wayfinder calls on the same page.

              All the best,

              Jay
                Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
                • 9728
                • 25 Posts
                hey jay

                i’m sorry but i just cannot figure it out ... its driving me crazy ... is it to much to ask if you could help me building this ... its way too complicated for me since i don’t have enough experience in coding. i would really really appreciate your help.

                thanks a lot in advance!
                best
                firewireflow
                  • 27708 MODX Staff
                  • 2,502 Posts
                  It isn’t too much to ask but it can’t be this week. I am up to my ears with client work right now. You can PM me if you wish to contract this (even then it’ll be at least a week) or I’ll see when I can get around to it.

                  Cheers,

                  Jay
                    Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub