The UL/LI structure is not correct according to the HTML standard; nested ULs for child terms are directly in the parent UL of a taxonomy term. Instead, they should be inside the LI item that corresponds to the terms' parent.

Attached is a trivial patch that fixes this.

CommentFileSizeAuthor
taxonomy_block.html-nesting-fix.patch786 bytesPeter Bex

Comments

drupalnesia’s picture

Status: Active » Closed (fixed)

Nothing wrong with the code:

        $output .= '<li>';
        if (module_exists("i18n")) {
          $output .= l(tt("taxonomy:term:$tid_parent:name", $name_parent), "taxonomy/term/$tid_parent");
        } else {
          $output .= l(t($name_parent), "taxonomy/term/$tid_parent");  
        }
        if ($node_count) {
          $total_parent = db_result(db_query("SELECT COUNT(nid) FROM {term_node} WHERE tid = %d", $tid_parent));
          $output .= " ($total_parent)"; 
        }
        $output .= "</li>";   // This line needed to close the first <li> tag