Пример #1
0
     // On est sur une catégorie particulière
     $xoopsTpl->assign('category', $category->toArray());
     $title = _OLEDRION_CATEGORYC . ' ' . $category->getVar('cat_title') . ' - ' . oledrion_utils::getModuleName();
     if (!oledrion_utils::getModuleOption('manual_meta')) {
         oledrion_utils::setMetas($title, $title);
     } else {
         $pageTitle = xoops_trim($category->getVar('cat_metatitle')) == '' ? $title : $category->getVar('cat_metatitle');
         $metaDescription = xoops_trim($category->getVar('cat_metadescription')) != '' ? $category->getVar('cat_metadescription') : $title;
         $metaKeywords = xoops_trim($category->getVar('cat_metakeywords'));
         oledrion_utils::setMetas($pageTitle, $metaDescription, $metaKeywords);
     }
     $xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => $category->getVar('cat_title'))));
     if (OLEDRION_SHOW_SUB_CATEGORIES) {
         $count = 1;
         $firstChilds = array();
         $firstChilds = $mytree->getFirstChild($category->getVar('cat_cid'));
         foreach ($firstChilds as $children) {
             $tmpCategory = array();
             $tmpCategory = $children->toArray();
             $tmpCategory['count'] = $count;
             $xoopsTpl->append('subCategories', $tmpCategory);
             $count++;
         }
         $subCategoriesSearched = true;
     }
 } else {
     // page d'accueil des catégories
     $title = _OLEDRION_CATEGORIES . ' - ' . oledrion_utils::getModuleName();
     oledrion_utils::setMetas($title, $title);
     $xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_CATEGORIES)));
     if (OLEDRION_SHOW_MAIN_CATEGORIES) {