Topic: Showing Children via Drop Down
Hey,
The website I am working on currently has the following structure.
HOME | NORTH | SOUTH | NEWS | CONTACT
when i click NORTH it changes to
HOME | Economic Review | Our Services | Who We Help | Subscription Rates | News | About Us
When I put my mouse over Economic Review I need a drop down of the children pages for that one page....
How can I do this?
I already use this, but it puts the children in the main TR and adds TD for them... So I was wondering how I can make it on mouseover show a dropdown of the children ![]()
<table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<?php
function stackup($page, $level, &$astack)
{
$ancestor = $page->parent;
if ($ancestor)
{
$astack[$level + 1] = $ancestor;
stackup($ancestor, $level + 1, $astack);
}
}
function unstack($current, $max, $stack)
{
$here = $stack[$current];
$next = $stack[$current + 1];
$childs = $here->children();
$count = count($childs);
if ($count > 0)
{
foreach ($childs as $child)
{
if ($child->breadcrumb == $next->breadcrumb)
{
echo '<td height="43" align="center" background="http://www.taxbusters.eu.com/images/nav_back.jpg" class="navbar">'.$child->link()."\n";
if ($current < $max) {
unstack($current + 1, $max, $stack);
echo '</td>'."\n";
}
else echo '<td height="43" align="center" background="http://www.taxbusters.eu.com/images/nav_back.jpg" class="navbar">'.$child->link().'</td>'."\n";
}
else echo '<td height="43" align="center" background="http://www.taxbusters.eu.com/images/nav_back.jpg" class="navbar">'.$child->link().'</td>'."\n";
}
}
}
$astack[0] = $this;
stackup($this, 0, $astack);
$bstack = array_reverse($astack);
$lev = count($bstack) - 1;
if ($lev == 0) echo '<td height="43" align="center" background="http://www.taxbusters.eu.com/images/nav_back.jpg" class="navbar">'.$bstack[0]->link('', '')."\n";
else echo '<td height="43" align="center" background="http://www.taxbusters.eu.com/images/nav_back.jpg" class="navbar">'.$bstack[0]->link()."\n";
unstack(0, $lev, $bstack);
echo '</td>'."\n";
?>
</tr>
</table>Last edited by wickedwebsites (2010-04-16 00:59)
