We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16430
    • 217 Posts
    I solved the problem with missing id (missed [+wf.id+]), but I ended up with this:
    (see image)

    mm.config.php:
    <?php
    	$level = 3;
    	$parentClass = '';
    	$rowClass = '';
    	$selfClass = ''; 
    	$innerClass = '';
    	$hereClass = 'wf-active'; 
    	$firstClass = 'wf-first'; 
    	$lastClass = 'wf-last';
    	$outerTpl = '@CODE: <ul class="menu">	[+wf.wrapper+] </ul> 	';
    	$parentRowTpl = '@CODE:<li  [+wf.id+] >
            [[switch? 
           &get=`[[+wf.docid]]`    
           &c1=`1` &do1=`[[$menu1]]`    
           &c2=`2` &do2=`[[$menu141]]`    
           &c3=`3` &do3=`[[$menu112]]`    
           &default=`[[$defaultmenu]]`  
    ]]</li>';
      $innerTpl = '@CODE:<ul>[+wf.wrapper+]	</ul>';
    	$RowTpl = '@CODE:<li  ><a [+wf.classes+] href="[+wf.link+]" title="">[+wf.linktext+]</a></li>';
      $innerRowTpl = '@CODE: <li><a [+wf.classes+] href="[+wf.link+]" title="" >[+wf.linktext+]</a>[+wf.wrapper+]</li>';
    
    ?>


    chunk menu1:
    <a [+wf.classes+] href="[+wf.link+]" title="test">[+wf.linktext+]</a>

    chunk menu 141:
    <a href="[+wf.link+]" class="drop">[+wf.linktext+]</a>
        <div class="dropdown_1column">
           <div class="col_1 firstcolumn">
               <ul class="levels">
                    <li><a href="[+wf.link+]">[+wf.linktext+]</a></li>
               </ul>
           </div>
        </div>   
      • 33968
      • 863 Posts
      You’re still using Revo syntax for the switch snippet. Try this:
      [!switch? 
             &get=`[+wf.docid+]`    
             &c1=`1` &do1=`{{menu1}}`    
             &c2=`2` &do2=`{{menu141}}`    
             &c3=`3` &do3=`{{menu112}}`    
             &default=`{{defaultmenu}}`  
      !]
      
        • 16430
        • 217 Posts
        not much better now...
        (see image)
        I tried to move switch call to the chunk a call chunk in wayfinder snippet but it doesnt work either...
          • 33968
          • 863 Posts
          I’m sorry, I haven’t used Evo for a long time - the snippet needs to all be on one line. So change it to this:
          [!switch? &get=`[+wf.docid+]` &c1=`1` &do1=`{{menu1}}` &c2=`2` &do2=`{{menu141}}` &c3=`3` &do3=`{{menu112}}` &default=`{{defaultmenu}}`!]
          

          I’m not sure about the parse order in Evo but I had no problems with it in Revo. Hope that works for you!
            • 16430
            • 217 Posts
            ...no it doesnt....
            anyway still dont see the problem why snippet is not working. Not sure how those numbers in variable working c1, c2, do1, do2 etc... is it in any connection with chunk name (id) ?
              • 33968
              • 863 Posts
              I guess I wasn’t paying attention - you haven’t configured the snippet correctly.

              It should be:
              [!switch? &get=`[+wf.docid+]` &c1=`1` &do1=`{{menu1}}` &c2=`141` &do2=`{{menu141}}` &c3=`112` &do3=`{{menu112}}` &default=`{{defaultmenu}}`!]
              
                • 16430
                • 217 Posts
                Quote from: lucas at Jun 13, 2011, 01:20 PM

                I guess I wasn’t paying attention - you haven’t configured the snippet correctly.

                It should be:
                [!switch? &get=`[+wf.docid+]` &c1=`1` &do1=`{{menu1}}` &c2=`141` &do2=`{{menu141}}` &c3=`112` &do3=`{{menu112}}` &default=`{{defaultmenu}}`!]
                


                this makes no difference.
                The snippet doesnt seems to work when is in config.php file (because it shows the code) and in chunk it doesnt do anything...
                  • 33968
                  • 863 Posts
                  I think it’s due to Evo’s parse order (it does work perfectly in Revo).

                  Let’s see if the snippet works to begin with, just try this (in the parentRowTpl):
                  [!switch? &get=`[+wf.docid+]` &c1=`1` &do1=`menu1` &c2=`141` &do2=`menu141` &c3=`112` &do3=`menu112` &default=`defaultmenu`!]
                  

                  It won’t load the chunks but should just display ’menu1’, ’menu141’, etc in the right places.
                    • 6774
                    • 4 Posts
                    I have been trying to get the solution suggested by qidoc to work on a modx Revolution 2.1.3-pl.

                    Has anyone else got the solution to work and would like to share their chunks or have a look through mine??

                    This would be of great help because I’m struggling to make this work after following the solutions.

                    Thanks

                    Darren
                      • 33968
                      • 863 Posts
                      Hey Darren, have you got this working yet? If not, feel free to post your markup here...