<![CDATA[ How to remove link from parent level if there is submenu? - My Forums]]> https://forums.modx.com/thread/?thread=100744 <![CDATA[How to remove link from parent level if there is submenu?]]> https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544322 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.]]>
a.mustafin Aug 19, 2016, 03:58 AM https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544322
<![CDATA[Re: How to remove link from parent level if there is submenu?]]> https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544363 a.mustafin Aug 21, 2016, 11:35 PM https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544363 <![CDATA[Re: How to remove link from parent level if there is submenu?]]> https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544332
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?]]>
a.mustafin Aug 19, 2016, 08:06 AM https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544332
<![CDATA[Re: How to remove link from parent level if there is submenu?]]> https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544327
<li class="active open_sec_nav [[+wf.classnames]]">[[+wf.linktext]]
  [[+wf.wrapper]]
</li>
]]>
Bruno17 Aug 19, 2016, 06:32 AM https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544327
<![CDATA[Re: How to remove link from parent level if there is submenu?]]> https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544325 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.]]>
a.mustafin Aug 19, 2016, 05:16 AM https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544325
<![CDATA[Re: How to remove link from parent level if there is submenu?]]> https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544323 Bruno17 Aug 19, 2016, 04:42 AM https://forums.modx.com/thread/100744/how-to-remove-link-from-parent-level-if-there-is-submenu#dis-post-544323