Hi,
The markup generated by the theme_uc_store_block_links() function in uc_store.module includes many redundant UL elements, causing strict validation to fail.
This can be fixed by checking the output of theme_uc_store_block_links() and only wrapping it in UL tags when necessary.
Here is a modified version that fixes the problem ... I hope it can be incorporated into the code, but I'm not sure who to contact.
<?php
function theme_uc_store_block_links($menu){
if (!($menu['type'] & MENU_VISIBLE_IN_TREE)){
return '';
}
$depth = count(explode('/', $menu['path']));
$link_title = uc_store_get_icon($menu['path'], TRUE) .' '. $menu['title'];
$output = str_repeat(" ", $depth) .'<li>'
. l($link_title, $menu['path'], array(), NULL, NULL, FALSE, TRUE);
if (is_array($menu['children']) && !empty($menu['children'])){
usort($menu['children'], '_menu_sort');
$kid_output='';
foreach ($menu['children'] as $child){
$kid_output .= theme('uc_store_block_links', menu_get_item($child));
}
if($kid_output) {
$output .= "\n". str_repeat(" ", 2 * $depth + 1) ."<ul>\n";
$output .= $kid_output;
$output .= str_repeat(" ", 2 * $depth + 1) ."</ul>\n". str_repeat(" ", $depth);
}
}
$output .= "</li>\n";
return $output;
}
?>cheers,
Matt






Joined: 09/28/2007