Beispiel #1
0
    abr('paging', paging('/' . $languageURL . 'categories/' . $categoryID . '/?p=', '&sort_by=' . $_GET['sort_by'] . '&order=' . $_GET['order'], PAGE, $limit, $itemsClass->foundRows));
    #加载类别
    require_once ROOT_PATH . '/apps/categories/models/categories.class.php';
    $categoriesClass = new categories();
    $categories = $categoriesClass->getAll();
    abr('categories', $categories);
    #面包屑
    if (isset($categoryID) && is_numeric($categoryID)) {
        #设置元信息
        if ($category['meta_title'] != '') {
            $smarty->assign('title', $category['meta_title']);
        } else {
            $smarty->assign('title', $category['name']);
        }
        if ($category['meta_keywords'] != '') {
            $smarty->assign('meta_keywords', $category['meta_keywords']);
        }
        if ($category['meta_description'] != '') {
            $smarty->assign('meta_description', $category['meta_description']);
        }
        abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'categories/" title="">' . $langArray['categories'] . '</a> \\ <a href="/' . $languageURL . 'categories/' . $category['id'] . '" title="">' . $category['name'] . '</a>');
    } else {
        abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'categories/" title="">' . $langArray['categories'] . '</a> \\ <a href="/' . $languageURL . 'categories/all" title="">' . $langArray['all_files'] . '</a>');
    }
} else {
    $allCategories = $categoriesClass->getAllWithChilds(0, " `visible` = 'true' ");
    $categoriesList = $categoriesClass->generateList($allCategories);
    abr('categoriesList', $categoriesList);
    #面包屑
    abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'categories/" title="">' . $langArray['categories'] . '</a>');
}