J5_02公共模板
頭部尾部
<TITLE>{$=$htmlEncode(implode(' - ', array_reverse($meta_title)))}</TITLE>
<META NAME="Keywords" CONTENT="{$=$htmlEncode($meta_keywords)}">
<META NAME="Description" CONTENT="{$=$htmlEncode($meta_description)}">
圖片css文件放在/jtbc/Public/common/assets/static/
路徑調(diào)用{$=$root_assets_path}/static/
<ul>
<li><a href="{$=$getActualRoute('./')}">{$=$take('global.communal.home', 'lng')}</a></li>
<li genre="aboutus"><a href="{$=$getActualRoute('aboutus/')}">{$=$take('global.aboutus:index.title', 'lng')}</a></li>
<li genre="product"><a href="{$=$getActualRoute('product/')}">{$=$take('global.product:index.title', 'lng')}</a></li>
<li genre="news"><a href="{$=$getActualRoute('news/')}">{$=$take('global.news:index.title', 'lng')}</a></li>
<li genre="team"><a href="{$=$getActualRoute('team/')}">{$=$take('global.team:index.title', 'lng')}</a></li>
<li genre="partnership"><a href="{$=$getActualRoute('partnership/')}">{$=$take('global.partnership:index.title', 'lng')}</a></li>
<li genre="recruitment"><a href="{$=$getActualRoute('recruitment/')}">{$=$take('global.recruitment:index.title', 'lng')}</a></li>
</ul>
導(dǎo)航調(diào)用分類{$=$render('global.render.product-index-div', $fetch(['genre' => 'universal/category', 'where' => ['genre' => 'product', 'father_id' => 0]]))}
模塊變量分類URL:{@}<a href="../{$genre}/?type=list&category={$id}">{$title}</a>{@}
調(diào)用關(guān)于我們列表{$=$render('global.render.header-about-li', $fetch(['genre' => 'aboutus', 'limit' => 10]))}
節(jié)點(diǎn)代碼:{@}<a class="dropdown-item" href="/aboutus/?type=detail&id={$id}">{$title}</a>{@}
頁尾JS加上,不然面包屑和分頁不顯示<script type="module">import('./{$=$root_assets_path}/js/jtbc.js').then(module => { window.jtbc = new module.default(); });</script>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~··
調(diào)用一級分類和二級分類循環(huán)調(diào)用代碼
{$=$render('global.render.header-product-list', $fetch(['genre' => 'universal/category', 'where' => ['genre' => 'product', 'father_id' => 0]]))}
其中header-product-list節(jié)點(diǎn)代碼
<ul class="dropdown-menu">
{@}<li class="dropdown-submenu">
<a class="dropdown-item" href="../{$genre}/?type=list&category={$id}">{$title}</a>
<ul class="dropdown-menu">
{$=$render('global.render.header-product-list-2', $fetch(['genre' => 'universal/category', 'where' => ['genre' => '{$genre}','father_id' => '{$id}'], 'limit' => 10]))}
</ul>
</li>{@}
</ul>
其中header-product-list-2節(jié)點(diǎn)代碼
{@}<li>
<a class="dropdown-item" href="../{$genre}/?type=list&category={$id}">{$title}</a>
</li>
{@}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~··