function theme_uc_catalog_item in Ubercart 6.2
Same name and namespace in other branches
- 8.4 uc_catalog/uc_catalog.theme.inc \theme_uc_catalog_item()
- 5 uc_catalog/uc_catalog.module \theme_uc_catalog_item()
- 7.3 uc_catalog/uc_catalog.theme.inc \theme_uc_catalog_item()
Displays a formatted link in the catalog block.
1 theme call to theme_uc_catalog_item()
- _uc_catalog_navigation in uc_catalog/
uc_catalog.module - Emulates Drupal's menu system, but based solely on the structure of "Product Catalog".
File
- uc_catalog/
uc_catalog.module, line 948 - Ubercart Catalog module.
Code
function theme_uc_catalog_item($here, $link, $lis, $expand, $inpath, $count_children) {
$output = '';
if ($expand || $count_children) {
if ($here) {
$output = '<li class="expanded"><span class="trail">' . $link . "</span>\n";
if (count($lis)) {
$output .= '<ul class="menu">';
foreach ($lis as $li) {
$output .= $li . "\n";
}
$output .= "</ul>\n";
}
$output .= "</li>";
}
elseif ($expand || $inpath) {
$output = '<li class="expanded"><span class="trail">' . $link . "</span>\n";
if (count($lis)) {
$output .= '<ul class="menu">';
foreach ($lis as $li) {
$output .= $li;
}
$output .= "</ul>\n";
}
$output .= "</li>";
}
else {
$output = '<li class="collapsed">' . $link . "</li>\n";
}
}
else {
$output = '<li class="leaf">' . ($inpath ? '<span class="trail">' : '') . $link . ($inpath ? '</span>' : '') . "</li>\n";
}
return $output;
}