I had several problems but only one deals with the code itself. (My browser doesn’t seem to handle the <span> tag very well. The description was right up against the link. I added
tag just before the span tag to get the description to start on the next line. YMMV.)
The one problem I consistently had was that the pagetitle was being displayed no matter what I set
$linkTitle to. It appears that because I was on the parent page, I wasn’t hitting either condition in the
if ($onCurrentPage){ section.
My code was dropping right through and hitting
$lcosOutput .= $children[$c]['pagetitle'];
I changed that line to match the else condition, getting
$lcosOutput .= ($children[$c][$linkTitle])? $children[$c][$linkTitle] : $children[$c]['pagetitle'] ;
and it worked!
I’m sorry if this is a kludge. I would love to learn how to clean it up or figure out why I’m not hitting the "else".
Thanks for a WONDERFUL snippet!