Ok guys I have a navigation (CSS <ul><li> etc drop menu) which needs to be populated dynamically. I have an associative array which holds each nav node ID, Title, and array(children).
My problem right now is that my script is either skipping a bunch of child nodes or putting tags in the wrong places. I've literally been on a trial/error debug run for like 12 hours on this and after 3 I took myself off the clock because I feel like a total noob for probably missing something really obvious.
Essentially my nav has 5 buttons - they are all nav nodes themselves, so in my class I just do a check to see if the nav node is one of the 'master' nodes and force it to be wrapped in a <ul> for css aesthetics. That might be screwing up the whole thing - my brain is so fried on this script...I really need another set of eyes looking at it.
Here's my class file (class.NavMenu.php). It extends class.Nav.php which just houses all the database queries for this nav and the subpage side-nav (not applicable here):
<?php
/** **************************************************************************
* NAV MENU CLASS MANAGES NAVIGATIONAL HEIRARCHY AND DISPLAY
******************************************************************************/
class NavMenu extends Nav{
private $nn_id;
private $nn_title;
/** CONSTRUCTOR **********************************************************/
public function __construct($nn_id, $nn_title, $children, $cat=NULL) {
# INSTANTIATE NEW PAGE FOR DB METHODS
$this->page = Page::instantiate();
# GLOBALIZE ARGUMENT
$this->nn_id = $nn_id;
$this->nn_title = $nn_title;
$this->children = $children;
$this->depth = $depth;
# CREATE ARRAY FOR CHILDREN
$this->childlist = array();
# INSTANTIATE NEW NAV OBJECT FOR THIS NODE
$this->node = new Nav($this->nn_id);
# IF THIS NODE IS ASSIGNED AS A CATEGORY, PULL FROM ITSELF AND NOT ITS PARENT
if($cat)
$SQL_cat = 'AND nn_wpc_id = '.$cat;
# BUILD SQL
$SQL = 'SELECT * FROM nav_nodes WHERE nn_parent = '.$nn_id.' '.$SQL_cat.' ORDER BY nn_parent ASC, nn_id ASC ';
# QUERY DATABASE
$rs = $this->page->db_query($SQL);
# IF RECORDSET IS NOT EMPTY, CONTINUE
$count = 0;
if(is_array($rs)){
# ITERATE RECORDSET
foreach($rs as $row){
# INSTANTIATE A NEW NAVMENU OBJECT RECURSIVELY
$this->childlist[$count]= new NavMenu($row['nn_id'],$row['nn_title'], $this->page->db_count('nn_id','nav_nodes','nn_parent = '.$row['nn_id']));
$count++;
} // next
}// end if is array
} // end method
/** METHOD DISPLAYS NAV TREE *********************************************/
public function display(){
# BUFFER OUTPUT
$tmp = '';
//echo $this->page->print_html_r($this->childlist);
# CALL DISPLAY ON EACH OF THIS NODES CHILDREN -- A NODE WILL ONLY HAVE CHILDREN IN ITS LIST IF EXPANDED
$num_children = count($this->childlist);
# OPEN UNORDERED LIST - IF THIS UL IS A NESTED UL, APPEND CLASS FOR CSS DROP MENU
if($this->node->nn_parent != 0)
$ul_class = 'class="menu_ul"';
else
$ul_class = '';
# VERBOSE DEBUG OUTPUT
// echo $this->node->nn_title.' has '.$num_children.' kids<br />';
# IF THIS NODE HAS CHILDREN OR IF THIS IS A MASTER NODE - MASTER NODES ARE THE NAV BUTTONS AND NEED TO BE WRAPPED IN <UL> FOR THE CSS MENU
if($num_children > 0 || $this->node->nn_parent == 0){
$tmp.= NL.'<!-- OPEN UNORDERED LIST FOR '.strtoupper($this->node->nn_title).' -->'.NL.'<ul '.$ul_class.'>'.NL;
# VERBOSE DEBUG OUTPUT
echo $this->node->nn_title.' - UL just opened.<br />';
}
else{
# VERBOSE DEBUG OUTPUT
echo $this->node->nn_title.' - UL SKIPPED.<br />';
return '';
}
# GRAB RECURSIVE PARENT BRANCH TO CREATE LINK PATH
$branch = $this->get_recursive_parent_nodes($this->nn_id);
$path = '';
if(is_array($branch)){
foreach($branch as $limb)
$path.= $limb['nn_uri'].'/';
}
# STRIP TRAILING SLASH
$path = rtrim($path,'/');
# GRAB WEB PAGE URI IF WEB PAGE HAS BEEN ASSIGNED TO THIS NODE
if($this->node->nn_wp_id > 0){
$wp_uri = $this->page->db_lookup('wp_uri','web_pages','wp_id='.$this->node->nn_wp_id);
$full_link = WWW.'/'.$path.'/'.$wp_uri;
}
# AUTOMATICALLY OVERRIDE WEB PAGE URI IF EXTERNAL LINK WAS PROVIDED
if($this->node->nn_external_link)
$full_link = $this->node->nn_external_link;
# WRAP NODE DATA IN A LIST AND CHECK FOR MAIN NAV ELEMENTS
$li_id = '';
$a_class = '';
$a_value = $this->node->nn_title;
switch($this->node->nn_id){
# HOME NAV BUTTON
case 1:
$li_id = 'id="menu_main_li_home"';
$a_class = 'class="main"';
$a_value = '<img src="'.WWW.'/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Home" />';
break;
# ABOUT US NAV BUTTON
case 2:
$li_id = 'id="menu_main_li_about"';
$a_class = 'class="main"';
$a_value = '<img src="'.WWW.'/images/clear.gif" style="width:180px; height:38px; border:0;" alt="About" />';
break;
# GALLERY NAV BUTTON
case 3:
$li_id = 'id="menu_main_li_gallery"';
$a_class = 'class="main"';
$a_value = '<img src="'.WWW.'/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Gallery" />';
break;
# RESOURCES NAV BUTTON
case 4:
$li_id = 'id="menu_main_li_resources"';
$a_class = 'class="main"';
$a_value = '<img src="'.WWW.'/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Resources" />';
break;
# CONTACT NAV BUTTON
case 5:
$li_id = 'id="menu_main_li_contact"';
$a_class = 'class="main"';
$a_value = '<img src="'.WWW.'/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Contact" />';
break;
} // end switch
# INJECT NEW LIST ELEMENT INTO OUTPUT BUFFER
$nn_title = $this->childlist[$i]->node->nn_title;
$tmp.= NL.'<!-- OPEN LIST ELEMENT FOR '.strtoupper($this->node->nn_title).' -->'.NL;
$tmp.= '<li '.$li_id.'>'.NL.'<a href="'.$full_link.'" '.$a_class.'>'.$a_value.'</a>'.NL;
# CALL METHOD RECURSIVELY FOR EACH CHILD ARRAY PRESENT - ($this->node->nn_title IS NOT PRESENT IN THE CLOSING TAGS, BUT $this->childlist[$i]->node->nn_title IS... RED FLAG?
for($i=0; $i<$num_children; $i++)
$tmp.= $this->childlist[$i]->display().'</li>'.NL.'<!-- CLOSE LIST ELEMENT FOR '.strtoupper($this->childlist[$i]->node->nn_title).' -->'.NL;
# CLOSE UNORDERED LIST - PREVIOUS METHOD WAS RETURNED
$tmp.= '</ul>'.NL.'<!-- CLOSE UNORDERED LIST FOR '.strtoupper($this->node->nn_title).' -->'.NL.NL;
# RETURN OUTPUT
return $tmp;
} // end method
} // end class
In my inc.header.php file, I call the method like such:
/** INSTANTIATE NEW NAV MENU OBJECT ******************************************/ $menu = new NavMenu(0, '', 1); /** DISPLAY MENU *************************************************************/ echo '<div id="menu">'.NL; echo $menu->display(); echo '</div>'.NL;
Currently the output is this:
- UL just opened.
Home - UL just opened.
About - UL just opened.
Awards - UL SKIPPED.
Professional - UL SKIPPED.
Gallery - UL just opened.
Kitchens - UL just opened.
Minnetonka Kitchen - UL SKIPPED.
Traditional Kitchen - UL SKIPPED.
Lowry Hill - UL SKIPPED.
Baths - UL just opened.
Minnetonka Bath - UL SKIPPED.
Bryn Mawr Bath - UL SKIPPED.
Kenwood Bath - UL SKIPPED.
Closet - UL just opened.
Lowry Hill Closet - UL SKIPPED.
Additions - UL just opened.
Historic Addition - UL SKIPPED.
Living - UL just opened.
Lowry Hill Fireplace - UL SKIPPED.
Resources - UL just opened.
Contact - UL just opened.
That output is good news because it's acknowledging the nodes with children and opening UL's for them. Unfortunately, No markup or anything is showing up. Here's the output source (minus all the other page stuff):
<div id="menu"> - UL just opened.<br />Home - UL just opened.<br />About - UL just opened.<br />Awards - UL SKIPPED.<br />Professional - UL SKIPPED.<br />Gallery - UL just opened.<br />Kitchens - UL just opened.<br />Minnetonka Kitchen - UL SKIPPED.<br />Traditional Kitchen - UL SKIPPED.<br />Lowry Hill - UL SKIPPED.<br />Baths - UL just opened.<br />Minnetonka Bath - UL SKIPPED.<br />Bryn Mawr Bath - UL SKIPPED.<br />Kenwood Bath - UL SKIPPED.<br />Closet - UL just opened.<br />Lowry Hill Closet - UL SKIPPED.<br />Additions - UL just opened.<br />Historic Addition - UL SKIPPED.<br />Living - UL just opened.<br />Lowry Hill Fireplace - UL SKIPPED.<br />Resources - UL just opened.<br />Contact - UL just opened.<br /> <!-- OPEN UNORDERED LIST FOR --> <ul > <!-- OPEN LIST ELEMENT FOR --> <li > <a href="" ></a> <!-- OPEN UNORDERED LIST FOR HOME --> <ul > <!-- OPEN LIST ELEMENT FOR HOME --> <li id="menu_main_li_home"> <a href="" class="main"><img src="http://www.michaelreel.com/_v2/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Home" /></a> </ul> <!-- CLOSE UNORDERED LIST FOR HOME --> </li> <!-- CLOSE LIST ELEMENT FOR HOME --> <!-- OPEN UNORDERED LIST FOR ABOUT --> <ul > <!-- OPEN LIST ELEMENT FOR ABOUT --> <li id="menu_main_li_about"> <a href="" class="main"><img src="http://www.michaelreel.com/_v2/images/clear.gif" style="width:180px; height:38px; border:0;" alt="About" /></a> </li> <!-- CLOSE LIST ELEMENT FOR AWARDS --> </li> <!-- CLOSE LIST ELEMENT FOR PROFESSIONAL --> </ul> <!-- CLOSE UNORDERED LIST FOR ABOUT --> </li> <!-- CLOSE LIST ELEMENT FOR ABOUT --> <!-- OPEN UNORDERED LIST FOR GALLERY --> <ul > <!-- OPEN LIST ELEMENT FOR GALLERY --> <li id="menu_main_li_gallery"> <a href="" class="main"><img src="http://www.michaelreel.com/_v2/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Gallery" /></a> <!-- OPEN UNORDERED LIST FOR KITCHENS --> <ul class="menu_ul"> <!-- OPEN LIST ELEMENT FOR KITCHENS --> <li > <a href="" >Kitchens</a> </li> <!-- CLOSE LIST ELEMENT FOR MINNETONKA KITCHEN --> </li> <!-- CLOSE LIST ELEMENT FOR TRADITIONAL KITCHEN --> </li> <!-- CLOSE LIST ELEMENT FOR LOWRY HILL --> </ul> <!-- CLOSE UNORDERED LIST FOR KITCHENS --> </li> <!-- CLOSE LIST ELEMENT FOR KITCHENS --> <!-- OPEN UNORDERED LIST FOR BATHS --> <ul class="menu_ul"> <!-- OPEN LIST ELEMENT FOR BATHS --> <li > <a href="" >Baths</a> </li> <!-- CLOSE LIST ELEMENT FOR MINNETONKA BATH --> </li> <!-- CLOSE LIST ELEMENT FOR BRYN MAWR BATH --> </li> <!-- CLOSE LIST ELEMENT FOR KENWOOD BATH --> </ul> <!-- CLOSE UNORDERED LIST FOR BATHS --> </li> <!-- CLOSE LIST ELEMENT FOR BATHS --> <!-- OPEN UNORDERED LIST FOR CLOSET --> <ul class="menu_ul"> <!-- OPEN LIST ELEMENT FOR CLOSET --> <li > <a href="" >Closet</a> </li> <!-- CLOSE LIST ELEMENT FOR LOWRY HILL CLOSET --> </ul> <!-- CLOSE UNORDERED LIST FOR CLOSET --> </li> <!-- CLOSE LIST ELEMENT FOR CLOSET --> <!-- OPEN UNORDERED LIST FOR ADDITIONS --> <ul class="menu_ul"> <!-- OPEN LIST ELEMENT FOR ADDITIONS --> <li > <a href="" >Additions</a> </li> <!-- CLOSE LIST ELEMENT FOR HISTORIC ADDITION --> </ul> <!-- CLOSE UNORDERED LIST FOR ADDITIONS --> </li> <!-- CLOSE LIST ELEMENT FOR ADDITIONS --> <!-- OPEN UNORDERED LIST FOR LIVING --> <ul class="menu_ul"> <!-- OPEN LIST ELEMENT FOR LIVING --> <li > <a href="" >Living</a> </li> <!-- CLOSE LIST ELEMENT FOR LOWRY HILL FIREPLACE --> </ul> <!-- CLOSE UNORDERED LIST FOR LIVING --> </li> <!-- CLOSE LIST ELEMENT FOR LIVING --> </ul> <!-- CLOSE UNORDERED LIST FOR GALLERY --> </li> <!-- CLOSE LIST ELEMENT FOR GALLERY --> <!-- OPEN UNORDERED LIST FOR RESOURCES --> <ul > <!-- OPEN LIST ELEMENT FOR RESOURCES --> <li id="menu_main_li_resources"> <a href="" class="main"><img src="http://www.michaelreel.com/_v2/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Resources" /></a> </ul> <!-- CLOSE UNORDERED LIST FOR RESOURCES --> </li> <!-- CLOSE LIST ELEMENT FOR RESOURCES --> <!-- OPEN UNORDERED LIST FOR CONTACT --> <ul > <!-- OPEN LIST ELEMENT FOR CONTACT --> <li id="menu_main_li_contact"> <a href="http://www.michaelreel.com/_v2/contact/contact-twin-cities-home-builder-and-remodeler-michael-reel" class="main"><img src="http://www.michaelreel.com/_v2/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Contact" /></a> </ul> <!-- CLOSE UNORDERED LIST FOR CONTACT --> </li> <!-- CLOSE LIST ELEMENT FOR CONTACT --> </ul> <!-- CLOSE UNORDERED LIST FOR --> </div>
Ok so, you'll notice that there are a bunch of nodes being closed </li> which are never actually opened. On line 89 of class.NavMenu.php I have a return ''; because my comprehension of recursion is to return if the recursive object does not meet the criteria. If I comment out that return line, all those missing children are now opened but everything is a big mess and out of order. Here's the html output of that:
<div id="menu"> - UL just opened.<br />Home - UL just opened.<br />About - UL just opened.<br />Awards - UL SKIPPED.<br />Professional - UL SKIPPED.<br />Gallery - UL just opened.<br />Kitchens - UL just opened.<br />Minnetonka Kitchen - UL SKIPPED.<br />Traditional Kitchen - UL SKIPPED.<br />Lowry Hill - UL SKIPPED.<br />Baths - UL just opened.<br />Minnetonka Bath - UL SKIPPED.<br />Bryn Mawr Bath - UL SKIPPED.<br />Kenwood Bath - UL SKIPPED.<br />Closet - UL just opened.<br />Lowry Hill Closet - UL SKIPPED.<br />Additions - UL just opened.<br />Historic Addition - UL SKIPPED.<br />Living - UL just opened.<br />Lowry Hill Fireplace - UL SKIPPED.<br />Resources - UL just opened.<br />Contact - UL just opened.<br /> <!-- OPEN UNORDERED LIST FOR --> <ul > <!-- OPEN LIST ELEMENT FOR --> <li > <a href="" ></a> <!-- OPEN UNORDERED LIST FOR HOME --> <ul > <!-- OPEN LIST ELEMENT FOR HOME --> <li id="menu_main_li_home"> <a href="" class="main"><img src="http://www.michaelreel.com/_v2/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Home" /></a> </ul> <!-- CLOSE UNORDERED LIST FOR HOME --> </li> <!-- CLOSE LIST ELEMENT FOR HOME --> <!-- OPEN UNORDERED LIST FOR ABOUT --> <ul > <!-- OPEN LIST ELEMENT FOR ABOUT --> <li id="menu_main_li_about"> <a href="" class="main"><img src="http://www.michaelreel.com/_v2/images/clear.gif" style="width:180px; height:38px; border:0;" alt="About" /></a> <!-- OPEN LIST ELEMENT FOR AWARDS --> <li > <a href="http://www.michaelreel.com/_v2/about-michael-reel/awards/michaelreel-building-and-remodeling-industry-awards" >Awards</a> </ul> <!-- CLOSE UNORDERED LIST FOR AWARDS --> </li> <!-- CLOSE LIST ELEMENT FOR AWARDS --> <!-- OPEN LIST ELEMENT FOR PROFESSIONAL --> <li > <a href="http://www.michaelreel.com/_v2/about-michael-reel/professional/professional-builder-and-remodeler-association" >Professional</a> </ul> <!-- CLOSE UNORDERED LIST FOR PROFESSIONAL --> </li> <!-- CLOSE LIST ELEMENT FOR PROFESSIONAL --> </ul> <!-- CLOSE UNORDERED LIST FOR ABOUT --> </li> <!-- CLOSE LIST ELEMENT FOR ABOUT --> <!-- OPEN UNORDERED LIST FOR GALLERY --> <ul > <!-- OPEN LIST ELEMENT FOR GALLERY --> <li id="menu_main_li_gallery"> <a href="" class="main"><img src="http://www.michaelreel.com/_v2/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Gallery" /></a> <!-- OPEN UNORDERED LIST FOR KITCHENS --> <ul class="menu_ul"> <!-- OPEN LIST ELEMENT FOR KITCHENS --> <li > <a href="" >Kitchens</a> <!-- OPEN LIST ELEMENT FOR MINNETONKA KITCHEN --> <li > <a href="http://www.michaelreel.com/_v2/gallery/kitchens/minnetonka-kitchen/minnetonka-modern-kitchen-remodel" >Minnetonka Kitchen</a> </ul> <!-- CLOSE UNORDERED LIST FOR MINNETONKA KITCHEN --> </li> <!-- CLOSE LIST ELEMENT FOR MINNETONKA KITCHEN --> <!-- OPEN LIST ELEMENT FOR TRADITIONAL KITCHEN --> <li > <a href="http://www.michaelreel.com/_v2/gallery/kitchens/traditional-minnetonka-kitchen/minnetonka-traditional-kitchen-remodel" >Traditional Kitchen</a> </ul> <!-- CLOSE UNORDERED LIST FOR TRADITIONAL KITCHEN --> </li> <!-- CLOSE LIST ELEMENT FOR TRADITIONAL KITCHEN --> <!-- OPEN LIST ELEMENT FOR LOWRY HILL --> <li > <a href="http://www.michaelreel.com/_v2/gallery/kitchens/lowry-hill/minneapolis-lowry-hill-kitchen-remodel" >Lowry Hill</a> </ul> <!-- CLOSE UNORDERED LIST FOR LOWRY HILL --> </li> <!-- CLOSE LIST ELEMENT FOR LOWRY HILL --> </ul> <!-- CLOSE UNORDERED LIST FOR KITCHENS --> </li> <!-- CLOSE LIST ELEMENT FOR KITCHENS --> <!-- OPEN UNORDERED LIST FOR BATHS --> <ul class="menu_ul"> <!-- OPEN LIST ELEMENT FOR BATHS --> <li > <a href="" >Baths</a> <!-- OPEN LIST ELEMENT FOR MINNETONKA BATH --> <li > <a href="http://www.michaelreel.com/_v2/gallery/baths/minnetonka-bath/minnetonka-modern-bath-remodel" >Minnetonka Bath</a> </ul> <!-- CLOSE UNORDERED LIST FOR MINNETONKA BATH --> </li> <!-- CLOSE LIST ELEMENT FOR MINNETONKA BATH --> <!-- OPEN LIST ELEMENT FOR BRYN MAWR BATH --> <li > <a href="http://www.michaelreel.com/_v2/gallery/baths/bryn-mawr-bath/minneapolis-bryn-mawr-bath-remodel" >Bryn Mawr Bath</a> </ul> <!-- CLOSE UNORDERED LIST FOR BRYN MAWR BATH --> </li> <!-- CLOSE LIST ELEMENT FOR BRYN MAWR BATH --> <!-- OPEN LIST ELEMENT FOR KENWOOD BATH --> <li > <a href="http://www.michaelreel.com/_v2/gallery/baths/kenwood-bath/minneapolis-kenwood-bath-remodel" >Kenwood Bath</a> </ul> <!-- CLOSE UNORDERED LIST FOR KENWOOD BATH --> </li> <!-- CLOSE LIST ELEMENT FOR KENWOOD BATH --> </ul> <!-- CLOSE UNORDERED LIST FOR BATHS --> </li> <!-- CLOSE LIST ELEMENT FOR BATHS --> <!-- OPEN UNORDERED LIST FOR CLOSET --> <ul class="menu_ul"> <!-- OPEN LIST ELEMENT FOR CLOSET --> <li > <a href="" >Closet</a> <!-- OPEN LIST ELEMENT FOR LOWRY HILL CLOSET --> <li > <a href="http://www.michaelreel.com/_v2/gallery/other/lowry-hill-closet/minneapolis-lowry-hill-master-closet-design-and-build" >Lowry Hill Closet</a> </ul> <!-- CLOSE UNORDERED LIST FOR LOWRY HILL CLOSET --> </li> <!-- CLOSE LIST ELEMENT FOR LOWRY HILL CLOSET --> </ul> <!-- CLOSE UNORDERED LIST FOR CLOSET --> </li> <!-- CLOSE LIST ELEMENT FOR CLOSET --> <!-- OPEN UNORDERED LIST FOR ADDITIONS --> <ul class="menu_ul"> <!-- OPEN LIST ELEMENT FOR ADDITIONS --> <li > <a href="" >Additions</a> <!-- OPEN LIST ELEMENT FOR HISTORIC ADDITION --> <li > <a href="http://www.michaelreel.com/_v2/gallery/additions/historic-addition/minneapolis-lowry-hill-historic-family-room-addition" >Historic Addition</a> </ul> <!-- CLOSE UNORDERED LIST FOR HISTORIC ADDITION --> </li> <!-- CLOSE LIST ELEMENT FOR HISTORIC ADDITION --> </ul> <!-- CLOSE UNORDERED LIST FOR ADDITIONS --> </li> <!-- CLOSE LIST ELEMENT FOR ADDITIONS --> <!-- OPEN UNORDERED LIST FOR LIVING --> <ul class="menu_ul"> <!-- OPEN LIST ELEMENT FOR LIVING --> <li > <a href="" >Living</a> <!-- OPEN LIST ELEMENT FOR LOWRY HILL FIREPLACE --> <li > <a href="http://www.michaelreel.com/_v2/gallery/living/lowry-hill-fireplace/custom-fireplace-design-and-install" >Lowry Hill Fireplace</a> </ul> <!-- CLOSE UNORDERED LIST FOR LOWRY HILL FIREPLACE --> </li> <!-- CLOSE LIST ELEMENT FOR LOWRY HILL FIREPLACE --> </ul> <!-- CLOSE UNORDERED LIST FOR LIVING --> </li> <!-- CLOSE LIST ELEMENT FOR LIVING --> </ul> <!-- CLOSE UNORDERED LIST FOR GALLERY --> </li> <!-- CLOSE LIST ELEMENT FOR GALLERY --> <!-- OPEN UNORDERED LIST FOR RESOURCES --> <ul > <!-- OPEN LIST ELEMENT FOR RESOURCES --> <li id="menu_main_li_resources"> <a href="" class="main"><img src="http://www.michaelreel.com/_v2/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Resources" /></a> </ul> <!-- CLOSE UNORDERED LIST FOR RESOURCES --> </li> <!-- CLOSE LIST ELEMENT FOR RESOURCES --> <!-- OPEN UNORDERED LIST FOR CONTACT --> <ul > <!-- OPEN LIST ELEMENT FOR CONTACT --> <li id="menu_main_li_contact"> <a href="http://www.michaelreel.com/_v2/contact/contact-twin-cities-home-builder-and-remodeler-michael-reel" class="main"><img src="http://www.michaelreel.com/_v2/images/clear.gif" style="width:180px; height:38px; border:0;" alt="Contact" /></a> </ul> <!-- CLOSE UNORDERED LIST FOR CONTACT --> </li> <!-- CLOSE LIST ELEMENT FOR CONTACT --> </ul> <!-- CLOSE UNORDERED LIST FOR --> </div>
So that's that. I've done recursive functions before and never had this much trouble with them so I think I'm just missing something totally obvious. Any ideas of help would be amazing - this project has to go live tonight and this is all that's left. Go figure it's being stubborn at the last minute...
Thanks guys~
--S--
This post has been edited by AlienWebguy: 15 March 2009 - 02:04 PM

New Topic/Question
Reply




MultiQuote




|