Now today I did a new install on another server and copied the snippet from site 1 to new site 2, and get this error while using the snippet:
Fatal error: Call to a member function getActiveChildren() on a non-object in /www/.../index.php(508) : eval()'d code on line 71
I poked around on the new site and looked at it's installed version of ListSiteMap, and see that Ralph has made some improvements to Jaredc's version... but the old version should work as well, right? So i copied the unmodified 0.6h version of ListSiteMap and it doesn't work either on this install. The only thing I can think is that site 1 was originally 0.6.1.something and has been upgraded, but not sure what that has to do with anything.
i need to do one of 2 things...
1. find out why this doesnt work on site 2:
if(!isset($MakeMapDefined)){
function MakeMap($funcEtomite, $listParent, $listLevel, $description, $titleOfLinks,$maxLevels,$su){
$children = $funcEtomite->getActiveChildren($listParent, 'menuindex', 'ASC', 'id, pagetitle, description, parent, alias, longtitle, published');but this does: if(!isset($MakeMapDefined))
{
function MakeMap($listParent, $listLevel, $description, $titleOfLinks, $maxLevels, $su, $ie)
{
global $etomite;
$children = $etomite->getAllChildren($listParent, 'menuindex', 'ASC', 'id, pagetitle, description, parent, alias, longtitle, published');2. finish converting the newer version of LSM for the dropdown menu. I've got it close except for 2 things... setting $selfAsLink = true; doesn not make the current page a link (even in Ralph's version) and a bit of logic from the modified old LSM which added an id and class to the upper most ul does not work.
heres that:
// was -- $output .= $ie."<ul class=\"LSM_{$listLevel}\">".$ie;
// but we only want a class on top level ul so...
if($listLevel == 0) {$output .= '<ul id="nav" class="dropdown dropdown-horizontal">'.$ie;}
else { $output .= '<ul>'.$ie; }
foreach($children as $child)
{
...
but using that gives every nested ul the id and class as well. (on site 1 that works fine...)
I've been working at both issues for sometime and have to take a break and ask for help - if anything jumps out at you guys I'd sure appreciate being pointed in the right direction...











