<?php $page_class = 'page-channel-list'; include dirname(__DIR__) . '/_header.php'; ?>
<section class="banner-simple"><div class="container"><h1><?php echo htmlspecialchars(tplv($tplChannel, 'channel_name', '栏目列表')); ?></h1></div></section>
<?php if ($tplCurrent && tplv($tplChannel, 'channel_type') == 3) { ?>
<section class="section-block"><div class="container prose-block"><?php echo tplv($tplCurrent, 'page_content', tplv($tplCurrent, 'content')); ?></div></section>
<?php } elseif (!empty($tplChildren)) { ?>
<section class="section-block"><div class="container card-grid cols-3"><?php foreach ($tplChildren as $row) { ?><article class="show-card"><div class="show-body"><h3><a href="<?php echo tpl_url('channel', $row); ?>"><?php echo htmlspecialchars(tplv($row, 'channel_name')); ?></a></h3><p><?php echo htmlspecialchars(tplv($row, 'seo_description')); ?></p></div></article><?php } ?></div></section>
<?php } ?>
<?php if (!empty($tplList)) { ?><section class="section-block"><div class="container card-grid cols-3"><?php foreach ($tplList as $row) { $type = tplv($tplChannel, 'channel_type'); $model = $type == 2 ? 'product' : ($type == 4 ? 'image' : ($type == 5 ? 'download' : ($type == 7 ? 'video' : ($type == 9 ? 'recruit' : 'article')))); $desc = tplv($row, 'summary'); if ($desc === '') $desc = tplv($row, 'content'); ?><article class="show-card"><div class="show-thumb"><?php echo getLitpicHtml(tplv($row, 'litpic', tplv($row, 'video_cover')), tplv($row, 'title')); ?></div><div class="show-body"><h3><a href="<?php echo tpl_url($model, $row); ?>"><?php echo htmlspecialchars(tplv($row, 'title')); ?></a></h3><p><?php echo htmlspecialchars(tpl_excerpt($desc, 90)); ?></p></div></article><?php } ?></div><div class="pagination-wrap"><?php echo $tplPager; ?></div></section><?php } ?>
<?php include dirname(__DIR__) . '/_footer.php'; ?>
