Hi all,
I am trying to use my design with the MODx system, but have come to a problem with the DropMenu snippet. The problem is, I read in the source code of DropMenu the following:
// $hereClass [ string ]
// CSS Class for LI and A when they are the currently selected page, as well
// as any ancestors of the current page (YOU ARE HERE)
However, this doesn’t seem to give a class to the <a> tag at all, only the <li> tag. I need to use something along the lines of
<a href='#' class='active'>
However, I can’t seem to implement this. I guess it needs to be implemented around the following area of code, on line 260:
if ($itm && !$selfAsLink && ($child['id'] == $modx->documentIdentifier)) {
$output .= " <li class=\"$hereClass". ($numChildren == 0 ? ' last' : '')."\">$itm</li>$ie";
}
...But I’m not entirely sure how.
PS, I need to use both selfaslink and hereclass, so I’ve modded the line as suggested in another thread to:
if ($itm && ($child['id'] == $modx->documentIdentifier)) {
$output .= " <li class=\"$hereClass". ($numChildren == 0 ? ' last' : '')."\">$itm</li>$ie";
}
Thanks in advance for any help.