文章列表通用-の子页面 (qihuostudy)
当前的分类ID:
{php}
$currentCateId = intval($current_cate['id'] ?? '');
$currentCatePid = intval($current_cate['parent_id'] ?? '');
if($currentCatePid == 0){
$currentCatePid = $currentCateId;
}
var_dump($currentCateId); // 当前的分类
// var_dump($category_with_order_arr);
// var_dump($current_cate);
var_dump($currentCatePid);
// exit();
{/php}
{hcTaglib:category id="$currentCatePid" item="vo" field="*"}
{/hcTaglib:category}
左侧分类: ====================== START
{hcTaglib:subcategory pid="$currentCatePid" item="vo" sort=""}
{/hcTaglib:subcategory}
左侧分类: ====================== END
列表上方位置导航 ========== START
首页
{volist name="category_with_order_arr" id="oneCate"}
{$oneCate.title}
{/volist}
{$current_cate.title}
列表上方位置导航 ========== END
{hcTaglib:contentPage2 cid="$currentCateId" moduleId="1" name="articleList" limit="3" item="vo" field="id,title,thumbnail" sort="publish_time desc"}
{$vo.title}
{$vo.sub_title}
{$vo.publish_time}
{/hcTaglib:contentPage2}
{php}
$total = 0;
$lastPage = 0;
$currentPage = 0;
if ($articleList) {
$total = $articleList->total();
$lastPage = $articleList->lastPage();
$currentPage = $articleList->currentPage();
echo "总条数: " . $articleList->total() . "
";
echo "总页数: " . $articleList->lastPage() . "
";
echo "当前页: " . $articleList->currentPage() . "
";
echo "每页数量: " . $articleList->listRows() . "
";
}
{/php}