Hi Leslie,
Yes, you would have to modify the JavaScript like you show. However, be aware that using a span to trigger navigation will affect the accessibility of the site.
Announcement
Collapse
No announcement yet.
'Link: None' for Main Navigation Item
Collapse
X
-
Originally posted by lesliekirk View Post
I didn't make any tweaks to the javascript. I don't know which file to tweak.
line 51 in the omega-navigation.js
Code:$.hook('omega-child-menu').children('a, span').on('click', function (event) {
Leave a comment:
-
Okay, I think I may have answered my own question and will share the results with the class
[CODE]<li class="x-omega-navigation__list &mvt:has:children;">
<mvt:if expr="l.settings:navigationitem:link_type EQ 'N'">
<span class="x-omega-navigation__link" data-hook="omega-navigation__link &mvt:child:data;" href="&mvt:navigationitem:url;" target="&mvt:navigationitem:link_targ;">
&mvt:navigationitem:name;
<mvt:if expr="NOT ISNULL l.settings:navigationitem:items">
<span class="x-omega-navigation__link-carat u-hidden--l"><span class="u-icon-chevron-right"></span></span>
</mvt:if>
</span>
<mvt:else>
<a class="x-omega-navigation__link" data-hook="omega-navigation__link &mvt:child:data;" href="&mvt:navigationitem:url;" target="&mvt:navigationitem:link_targ;">
&mvt:navigationitem:name;
<mvt:if expr="NOT ISNULL l.settings:navigationitem:items">
<span class="x-omega-navigation__link-carat u-hidden--l"><span class="u-icon-chevron-right"></span></span>
</mvt:if>
</a>
</mvt:if>/CODE]
I didn't make any tweaks to the javascript. I don't know which file to tweak.
Leave a comment:
-
I'm running into this same problem with the Colossus primary_navigation - if an item on the left-hand side has "None" for the link, there still IS a link to for example https://www.domain.com/mm5/ which of course if you click on it takes you that that great 403 Forbidden page.
The code in the menu I'm working on seems to be different (CSS class wise) than what is posted
I have
Code:<li class="x-omega-navigation__list &mvt:has:children;"> <a class="x-omega-navigation__link" data-hook="omega-navigation__link &mvt:child:data;" href="&mvt:navigationitem:url;" target="&mvt:navigationitem:link_targ;"> &mvt:navigationitem:name; <mvt:if expr="NOT ISNULL l.settings:navigationitem:items"> <span class="x-omega-navigation__link-carat u-hidden--l"><span class="u-icon-chevron-right"></span></span> </mvt:if> </a>
On a side note, how do I get the links that display on the right-hand side to "go away" if one of the links on the left doesn't have any child categories? There doesn't seem to be an off type state just a trigger if there are child categories.
But getting the first question answered is more important.
Leave a comment:
-
Here is the solution that worked - thanks Matt:
Edit the readytheme navigation set:
Replace
Code:<li class="c-navigation__list &mvt:has:children;"> <a class="c-navigation__link" href="&mvte:navigationitem:url;" target="&mvt:navigationitem:link_targ;">&mvt:navigationitem:name;&mvt:show:child;</a>
Code:<li class="c-navigation__list &mvt:has:children;"> <mvt:if expr="l.settings:navigationitem:link_type EQ 'N'"> <span class="c-navigation__link x-transfigure-navigation__link">&mvt:navigationitem:name;&mvt:show:child;</span> <mvt:else> <a class="c-navigation__link" href="&mvte:navigationitem:url;" target="&mvt:navigationitem:link_targ;">&mvt:navigationitem:name;&mvt:show:child;</a> </mvt:if>
Code:$.hook('has-child-menu').children('a, span').on('click', function (event) {
- 1 like
Leave a comment:
-
You could send me a direct message if you feel comfortable doing that. I have tested the demonstration site with changing a link to be none and everything still works as expected.
Leave a comment:
-
It is a dev site that is password protected. How should I send that to you?
Leave a comment:
-
Colossus was not really designed for the type of functionality. Can you post a link so I can see what might be done?
Leave a comment:
-
'Link: None' for Main Navigation Item
I am having the same issue mentioned here: https://www.miva.com/forums/forum/de...one-is-linking with setting a readytheme top level navigation menu item to "None" but that item still trying to link to nowhere. I fixed it on desktop by using:
Code:<li class="c-navigation__list &mvt:has:children;"> <mvt:if expr="l.settings:navigationitem:link_type EQ 'N'"> <span class="c-navigation__link">&mvt:navigationitem:name;&mvt:show:child;</span> <mvt:else> <a class="c-navigation__link" href="&mvte:navigationitem:url;" target="&mvt:navigationitem:link_targ;">&mvt:navigationitem:name;&mvt:show:child;</a> </mvt:if>
Tags: None
Leave a comment: