Some HTML validation fixes (don't render empty <ul> lists, empty id attributes, use &amp; not &)

This commit is contained in:
Andy Staudacher
2010-02-12 20:59:26 -08:00
parent f5d00863b8
commit 36702b1397
7 changed files with 22 additions and 9 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? if ($menu->elements): // Don't show the menu if it has no choices ?>
<? if (!$menu->is_empty()): // Don't show the menu if it has no choices ?>
<? if ($menu->is_root): ?>
<ul <?= isset($menu->css_id) ? "id='$menu->css_id'" : "" ?> class="<?= $menu->css_class ?>">
<ul <?= $menu->css_id ? "id='$menu->css_id'" : "" ?> class="<?= $menu->css_class ?>">
<? foreach ($menu->elements as $element): ?>
<?= $element->render() ?>
<? endforeach ?>