Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function: multi-level navigation. / Plugin for version 2!
#79
I re-installed pristine files to the live server and everything worked perfectly (even cURL). I then added my tweaked version of the plugin and got the error.

What's mystifying me is that my changes are limited to echoed lines. Am I tripping up a custom DTD or something?
  • moved the class attribute string out of the ternary operator
  • added a few new class values
  • nested the child UL within a DIV
  • added a <b>

This is the block of code containing the modifications.

Code:
echo '<ul class="level1">';
foreach ($menu as $link) {
     if ("$link->slug" == "") $link->slug = "index";
     $prnt = count($data->xpath('//item[slug="'.$a.'"][parent="'.$link->slug.'"]'));
     echo '<li class="level1-li'.("$link->slug"==$a?' active':($prnt>0?' parent':'')).'"><a class="level1-a drop" href="'.$link->url.'">'.($link->menu!=""?$link->menu:$link->title).'</a><b></b>';
     $menu = $data->xpath('//*[menuStatus="Y"][parent="'.$link->slug.'"]');
     usort($menu,"menu_sorting");
     if (count($menu) > 0) {
          echo '<div><ul>';
          foreach ($menu as $link) {
                echo '<li class="'.("$link->slug"==$a?' active':'').'"><a href="'.$link->url.'">'.($link->menu!=""?$link->menu:$link->title).'</a></li>';
          }
          echo '</ul></div>';
     }
     echo '</li>';
}
echo '</ul>';

(Fyi, I was building for this menu design: http://www.cssplay.co.uk/menus/black-any...tered.html).

I think I'm missing a fundamental in how GS works.

Any illumination would be great.

Jeff
Reply


Messages In This Thread
Function: multi-level navigation. / Plugin for version 2! - by Jeff - 2010-03-03, 05:18:54



Users browsing this thread: 2 Guest(s)