Esempio n. 1
0
     }
 }
 // Pager ******************************************************************************************
 // Recherche du nombre de produits dans cette catégorie
 $productsCount = $h_oledrion_products->getTotalPublishedProductsCount($cat_cid);
 $limit = oledrion_utils::getModuleOption('perpage');
 if ($productsCount > $limit) {
     require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
     $catLink = $category->getLink();
     $pagenav = new XoopsPageNav($productsCount, $limit, $start, 'start', 'cat_cid=' . $cat_cid);
     $xoopsTpl->assign('pagenav', $pagenav->renderNav());
 } else {
     $xoopsTpl->assign('pagenav', '');
 }
 // Breadcrumb *********************************************************************************
 $ancestors = $mytree->getAllParent($cat_cid);
 $ancestors = array_reverse($ancestors);
 $tbl_tmp[] = "<a href='" . OLEDRION_URL . "index.php' title='" . oledrion_utils::makeHrefTitle(oledrion_utils::getModuleName()) . "'>" . oledrion_utils::getModuleName() . '</a>';
 foreach ($ancestors as $item) {
     $tbl_tmp[] = "<a href='" . $item->getLink() . "' title='" . oledrion_utils::makeHrefTitle($item->getVar('cat_title')) . "'>" . $item->getVar('cat_title') . '</a>';
 }
 // Ajout de la catégorie courante
 $tbl_tmp[] = "<a href='" . $category->getLink() . "' title='" . oledrion_utils::makeHrefTitle($category->getVar('cat_title')) . "'>" . $category->getVar('cat_title') . '</a>';
 $breadcrumb = implode(' &raquo; ', $tbl_tmp);
 $xoopsTpl->assign('breadcrumb', $breadcrumb);
 // Meta ***************************************************************************************
 $title = strip_tags($breadcrumb);
 if (!oledrion_utils::getModuleOption('manual_meta')) {
     oledrion_utils::setMetas($title, $title, str_replace('&raquo;', ',', $title));
 } else {
     $pageTitle = xoops_trim($category->getVar('cat_metatitle')) == '' ? $title : $category->getVar('cat_metatitle');