We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22301
    • 1,084 Posts
    Yeh smiley &

    thank folks -- & who has created, & who helps to develop the MODx!
      [img]http://jurist-info.ru/pic/rrr.jpg[/img]

      Безжалостный пияр!
      Artima -- неуч!
      Осторожно: преступная локализация -- modx-cms.ru
      Баштанник Андрей -- мегапрограммер из Белоруссии и поедатель говна, очень критично настроенный молодой человек!

      Дисклеймер для общительных: даю сам себе право транслировать в открытый эфир содержание лички, just for fun
      • 36451
      • 264 Posts
      This problem is still valid in 0.9.2.1.: If a document is a folder AND it’s below the top level AND you want it not to be a link (selfAsLink=`false`) then DropMenu fails. Like topic starter wrote, change the original code at lines 238 - 245
      // it's a folder and it's below the top level
      				elseif ($isFolder && $inside) 
      				{
      				    
      					$itm .= ($itsEmpty && $useCategoryFolders) ?
      					        $pre.$child[$textOfLinks].$post . (($debugMode) ? 'subfolder T': '') :
      					        '<a href="[~'.$child['id'].'~]" title="'.$child[$titleOfLinks].'">'.$pre.$child[$textOfLinks].$post.'</a>'. (($debugMode) ? ' subfolder F' :'');        					
      				}
      to
      // it's a folder and it's below the top level
      				elseif ($isFolder && $inside) 
      				{
      				    
      					$itm .= ((!$selfAsLink && ($child['id'] == $modx->documentIdentifier)) || ($itsEmpty && $useCategoryFolders)) ?
      					$pre.$child[$textOfLinks].$post . (($debugMode) ? 'subfolder T': '') : '<a href="[~'.$child['id'].'~]" title="'.$child[$titleOfLinks].'">'.$pre.$child[$textOfLinks].$post.'</a>'. (($debugMode) ? ' subfolder F' :'');        					
      				}
      and you’re done.

      Thank you, openagate!
        • 6850
        • 12 Posts
        DropMenu also displays inconsistent with regard to "selfAsLink" activated. If "selfAsLink" is set to true then the "here" class for the parent document is discarded. If you are styling a menu with CSS using the "here" label, it shouldn’t matter whether or not "selfAsLink" is active or not. But DropMenu discards "here" for the parent document in the menu tree if "selfAsLink" is set to "true".
          • 36451
          • 264 Posts
          Quote from: ddmobley at Jun 14, 2006, 03:22 AM

          DropMenu also displays inconsistent with regard to "selfAsLink" activated. If "selfAsLink" is set to true then the "here" class for the parent document is discarded. If you are styling a menu with CSS using the "here" label, it shouldn’t matter whether or not "selfAsLink" is active or not. But DropMenu discards "here" for the parent document in the menu tree if "selfAsLink" is set to "true".
          http://modxcms.com/forums/index.php/topic,2609.msg17880.html#msg17880
            • 6726
            • 7,075 Posts
            Quote from: ddmobley at Jun 14, 2006, 03:22 AM

            DropMenu also displays inconsistent with regard to "selfAsLink" activated. If "selfAsLink" is set to true then the "here" class for the parent document is discarded. If you are styling a menu with CSS using the "here" label, it shouldn’t matter whether or not "selfAsLink" is active or not. But DropMenu discards "here" for the parent document in the menu tree if "selfAsLink" is set to "true".

            I happen to encounter this very problem and it’s driving me nuts sad !
            I didn’t connect it to the selfAsLink parameter, I’ll try to set it to false see if it solves it... thanks for pointing that out !

            I have tried the hack from Cino, but it only works with activeTreeOnly hack and I don’t want that...

            Quote from: yoomai at Jun 14, 2006, 09:48 AM
            http://modxcms.com/forums/index.php/topic,2609.msg17880.html#msg17880

            Thanks for the pointer !
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l&#39;outil id
              • 5338
              • 35 Posts
              Now I fixed it. Try the latest version (G1) of my hack at that topic.

              Please let me know if it’s working now.

              Thees are new features respect to the original one:


              • It has also a span tag around the very current item so you can call it as [[DropMenu]] and it will show a "id_here" id in a span tag surrounding the text appearing in the menu. You can wave all span tags just setting &currentSpan=’’.
              • If you want to have a single class in the <li> where current page it is, you can use &currentItem=true option and define that class by setting &currentItemClass.
              • If you want to use Lammikko’s &activeTreeOnly hack, I embedded it in this version of my hack and fixed it to automatically expand all CategoryFolder even if activeTreeOnly is set.