本文整理汇总了PHP中categories::generateList方法的典型用法代码示例。如果您正苦于以下问题:PHP categories::generateList方法的具体用法?PHP categories::generateList怎么用?PHP categories::generateList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类categories
的用法示例。
在下文中一共展示了categories::generateList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: abr
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>');
}