Announcement

Collapse
No announcement yet.

'Link: None' for Main Navigation Item

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    '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>
    However, this causes the dropdowns on mobile to not function. Any idea how to get this to work properly on both desktop and mobile?

    #2
    Colossus was not really designed for the type of functionality. Can you post a link so I can see what might be done?
    Matt Zimmermann
    Director of UI/UX
    / Miva, Inc.

    Comment


      #3
      It is a dev site that is password protected. How should I send that to you?

      Comment


        #4
        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.
        Matt Zimmermann
        Director of UI/UX
        / Miva, Inc.

        Comment


          #5
          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>
          with
          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>
          In transfigure-navigation.js change line 152 to
          Code:
          $.hook('has-child-menu').children('a, span').on('click', function (event) {

          Comment


            #6
            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>
            So how do I get the menu items that have "None" to not have something clickable but still trigger the mouseover?

            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.

            Leslie Kirk
            Miva Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

            Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

            Comment


              #7
              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.




              Leslie Kirk
              Miva Certified Developer
              Miva Merchant Specialist since 1997
              Previously of Webs Your Way
              (aka Leslie Nord leslienord)

              Email me: [email protected]
              www.lesliekirk.com

              Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

              Comment


                #8
                Originally posted by lesliekirk View Post

                I didn't make any tweaks to the javascript. I don't know which file to tweak.
                Is this it?

                line 51 in the omega-navigation.js

                Code:
                $.hook('omega-child-menu').children('a, span').on('click', function (event) {

                Leslie Kirk
                Miva Certified Developer
                Miva Merchant Specialist since 1997
                Previously of Webs Your Way
                (aka Leslie Nord leslienord)

                Email me: [email protected]
                www.lesliekirk.com

                Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                Comment


                  #9
                  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.
                  Matt Zimmermann
                  Director of UI/UX
                  / Miva, Inc.

                  Comment

                  Working...
                  X