{layout name="layout_two"/} {php} use app\model\Category; use app\model\Article; use app\model\Block; $position = Category::getPosition($category["id"]); $topNews = Article::getLastTopList($category["id"],1,[],["top"=>"desc"]); $topNews = empty($topNews)?[]:$topNews[0]; $blocks = Block::getByCategoryId(Category::CATEGORY_NEWS_BLOCK); $blocks = Block::convertValue($blocks); {/php}
{$category['title']}
{if !empty($topNews)}
{$topNews['title']}
{$topNews['create_time']|date="Y.m.d"}
{$topNews['title']}
{$topNews['summary']}
点击详情 +
{/if}
{if !empty($blocks['img_1'])} {/if} {if !empty($blocks['img_2'])} {/if}