We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33706
    • 51 Posts
    Hi.

    I have a problem when using DropMenu with documents that have an alias in thata field.
    This is the output of a page with folders and documents under them
    One folder and documents have no alias value, the other have alias value.

    This folder(Laboratorio) and sub-folder(Ceramica, etc..) has no alias!! It works perfectly.
    <li class="here"><a href="6.html" title="">Laboratorio</a>
    <ul>
        <li class="here"><a href="6/30.html" title="">Ceramica</a></li>
        <li><a href="6/31.html" title="">Tennis da tavola</a></li>
        <li><a href="6/32.html" title="">Cinema</a></li>
        <li><a href="6/33.html" title="">Arte del vetro</a></li>
        <li class="last"><a href="6/34.html" title="">Pallavolo</a></li>
    </ul>
    


    This folder (Genitori) and sub documents have an alias value.
    <li class="here"><a href="Genitori.html" title="">Genitori</a>
     <ul>
      <li class="here">Classe 1</li>  !!!!!!!!!!here is the error !!!!!!!!!!!!!!!!!!! no A tag is generated!!!!!!
      <li><a href="Genitori/genitori_classe_2.html" title="">Classe 2</a></li>
      <li class="last"><a href="Genitori/genitori_classe_3.html" title="">Classe 3</a></li>
     </ul>
    


    Why DropMenu does not generate a <a href> tag when the document has an alias?

    Thanks.

    • First, I highly recommend giving every folder and document an alias, or having them auto-generated from the page titles.

      Second, are you calling it with &selfAsLink=`1`? If so, then yes, this is most likely a defect in the snippet.

      Finally, if you can share the DropMenu tag you are using to call the snippet along with what version of the snippet you are using to render this, someone can probably help you out more.
        • 33706
        • 51 Posts
        Hi.
        Thank you for answering.

        I think I have found the bug :
        $selfAsLink nad $hereClass won’t work if both are called.

        Can you please confirm?

        Michel.
          • 33706
          • 51 Posts
          one more thing I forgot to write before :
          alias has something to do with all that.
          Because when there is no alias in the field it seems to work better.
          • If &selfAsLink is set, the snippet will not add the "here" class to the link. If it is not set, the active page’s entry will not be made a link. This makes it impossible to use certain types of css to style the links (such as the SlidingDoors rounded corner techniques), so there are a number of modified versions of DropMenu around the forums to change this behavior.

            I have always been puzzled over why it is a "Bad Thing" to have the current item display an active link.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org