chaoyu/view/en/article/product.html

55 lines
2.0 KiB
HTML
Executable File

{layout name="en/layout" /}
<!-- banner -->
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban3.jpg')});">
<div class="info">
<div class="w-1200 pt118">
<strong>{$topCategory.title_en ?? ''}</strong>
<p>{:nl2br($topCategory.description_en ?? '')}</p>
</div>
</div>
</div>
<!-- -->
<div class="all-center-box">
<div class="news-info w-100">
<div class="w-1200 product-title-box">
{if isset($categoryChildren) && count($categoryChildren) >0}
{foreach $categoryChildren as $idx => $cate}
{php}
$active = '';
if($categoryId == $cate['id']) {
$active = 'active';
} elseif ($categoryId == $topCategory['id'] && $idx == 0) {
$active = 'active';
}
{/php}
<div class="product-item {$active}">
<a href="{:url('en.article/index', ['category_id'=>$cate.id])}">{$cate.title_en}</a>
</div>
{/foreach}
{/if}
</div>
<div class="w-1200">
<div class="top-box w-100">
<span>{$article.title_en}</span>
<p>{$article.create_time|date="Y/m/d"}</p>
</div>
<div class="cen-box w-100">
{:nl2br($article.content_en)}
</div>
<div class="lower-box w-100">
<p>
{if isset($prev) && count($prev) >0}
<a href="{:url('en.article/detail', ['id' => $prev.id, 'source'=>$currentCateId])}">Prev</a>
{/if}
{if (isset($prev) && count($prev) >0) && (isset($next) && count($next) >0)}/{/if}
{if isset($next) && count($next) >0}
<a href="{:url('en.article/detail', ['id' => $next.id, 'source'=>$currentCateId])}">Next</a>
{/if}
</p>
<a href="{:url('en.article/index', ['category_id'=>$currentCateId])}" class="btns">Back</a>
</div>
</div>
</div>
</div>