New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • Good day all!
    I'm beginner in MODX Revo.

    I have a (maybe simple) question. I have menu with 2 levels. How to remove link from parent level if there is submenu?

    MODX Revolution version: 2.5.1

    menu:
    [[Wayfinder? 
    	&startId=`0`
    	&level=`2`
    	&outerTpl=`outerTpl`
    	&innerTpl=`innerTpl`
    	&rowTpl=`rowTpl`
    	&parentRowTpl=`parentRowTpl`
    	]]
    


    outerTpl:
    <ul class="nav clear">
      [[+wf.wrapper]] 
    </ul>
    


    innerTpl:
    <ul class="sec_nac">
      [[+wf.wrapper]]
    </ul>
    


    rowTpl:
    <li [[+wf.classes]]>
      <a href="[[+wf.link]]">[[+wf.linktext]]</a>
    </li>
    


    parentRowTpl:
    <li class="active open_sec_nav [[+wf.classnames]]"><a href="[[+wf.link]]">[[+wf.linktext]]</a>
      [[+wf.wrapper]]
    </li>
    


    There is no content to put in parent page, so I need to disable link.

    I read this post: https://forums.modx.com/thread/40823/how-to-disable-clickable-in-one-link-wayfinder

    tried to do same, but nothing changed. Cache cleared.
    • just removing the link from parentRowTpl should do it.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
      • Quote from: Bruno17 at Aug 19, 2016, 09:42 AM
        just removing the link from parentRowTpl should do it.

        Thank you Bruno for quick reply!, did it, now all parents with submenus removed, there is only links with 1st level where no submenus. [ed. note: a.mustafin last edited this post 2 years, 6 months ago.]
        • <li class="active open_sec_nav [[+wf.classnames]]">[[+wf.linktext]]
            [[+wf.wrapper]]
          </li>
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
          • Yes sure, I did same, and parents with submenus removed.

            If I put this:
            <li class="active open_sec_nav [[+wf.classnames]]"><a href="#">[[+wf.linktext]]</a>
              [[+wf.wrapper]]
            </li>
            

            parent link is with # link and submenus are ok.

            Is there any other way to solve this?
            • Sorry, problem was in css. It works, thank you.