{extend name="base" /} {block name="get-data"} {site:helper func="initVideoCategoryTypeTKD" /} {/block} {block name="title"}{site:replace code="VIDEO@GETCATEGORYINDEX@TITLE"}{/block} {block name="keywords"}{site:replace code="VIDEO@GETCATEGORYINDEX@KEYWORDS"}{/block} {block name="description"}{site:replace code="VIDEO@GETCATEGORYINDEX@DESCRIPTION"}{/block} {block name="head-css"}{/block} {block name="head-js"}{/block} {block name="main"}
{assign name="topModule" value="$TpStyle.template_cfg.pages.category_index.top_block.module"} {assign name="cfg" value="$TpStyle.template_cfg.list_layout[$topModule]"} {assign name="limit" value="$cfg['layout']['max_items']"} {if $topModule == 'rank'} {video:ranklistexp count="$limit" sort_type="weekly" d_key="key" d_val="Video" cache_life="3600" v_parent_category_en="$Request.route.strParentCategory" export_name="__LIST__" /} {else/} {video:listexp count="$limit" sort_type="$topModule" d_key="key" d_val="Video" cache_life="3600" v_parent_category_en="$Request.route.strParentCategory" export_name="__LIST__" /} {/if} {assign name="title" value="$cfg.title_text"} {include file="module/list/title/title_A" /} {assign name="listCfg" value="$TpStyle.template_cfg.list_layout.category_list_index"} {include file="module/list/shell/_shell_router" /} {video:categorytype category_type="ONE" d_key="key" d_val="val"} {if $val.v_category_en == $Request.route.strParentCategory} {foreach $val.children as $i => $sub} {video:listexp count="12" v_parent_category_en="$Request.route.strParentCategory" v_category_en="$sub.v_category_en" v_lang_en="all" v_area_en="all" v_year="all" sort_type="news" d_key="d_key" d_val="Video" cache_life="3600" export_name="__LIST__" /} {php} // 1️⃣ 生成该二级分类的 section cfg(冻结) $sectionCfg = \app\common\helper\SiteStyle::buildCategorySectionCfg( $TpStyle['template_cfg'], $sub['v_category_en'], $i ); // 2️⃣ 数据源(按二级分类变量名取) $listVar = 'arrSubPreview_' . $sub['v_category_en']; // $__LIST__ = $listVar ?? []; //$__LIST__ = $arrVideoNewest ?? []; // 3️⃣ Title(二级分类固定 F) $title = [ 'primary' => $sub['v_category'], 'secondary' => '精选推荐', ]; // 4️⃣ 更多链接 $moreUrl = '/videotype-dian-ying/xi-ju-pian-all-all-all/all-page1'; {/php}
{include file="module/list/title/title_F" /} {assign name="cfg" value="$sectionCfg"} {assign name="listCfg" value="$TpStyle.list_layout.category_list_index"} {include file="module/list/shell/_shell_router" /}
{/foreach} {/if} {/video:categorytype}
{/block} {block name="customize"} {/block}