J5_02公共模板

weeya4个月前JTBC教程60

头部尾部
    <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/
路径调用{$=$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>

导航调用分类{$=$render('global.render.product-index-div', $fetch(['genre' => 'universal/category', 'where' => ['genre' => 'product', 'father_id' => 0]]))}

模块变量分类URL:{@}<a href="../{$genre}/?type=list&amp;category={$id}">{$title}</a>{@}

调用关于我们列表{$=$render('global.render.header-about-li', $fetch(['genre' => 'aboutus', 'limit' => 10]))}
节点代码:{@}<a class="dropdown-item" href="/aboutus/?type=detail&amp;id={$id}">{$title}</a>{@}


页尾JS加上,不然面包屑和分页不显示<script type="module">import('./{$=$root_assets_path}/js/jtbc.js').then(module => { window.jtbc = new module.default(); });</script>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~··
调用一级分类和二级分类循环调用代码
{$=$render('global.render.header-product-list', $fetch(['genre' => 'universal/category', 'where' => ['genre' => 'product', 'father_id' => 0]]))}
其中header-product-list节点代码
<ul class="dropdown-menu">
{@}<li class="dropdown-submenu">
<a class="dropdown-item" href="../{$genre}/?type=list&amp;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节点代码
{@}<li>
<a class="dropdown-item" href="../{$genre}/?type=list&amp;category={$id}">{$title}</a>
</li>
{@}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~··

相关文章

J5_03首页模板

1、头尾模板调用代码{$=$take('global.communal.header')}{$=$take('global.communal.footer')}2、调用...

J5_04产品新闻列表页

1、头尾模板调用代码{$=$take('global.communal.header')}{$=$take('global.communal.footer')}1、模块...

J5增加tag标签自定义URL

1、index.php文件detail节点$rsTag = strval($rs -> tag);//增加tag模块管理-添加字段tag,16标签输入框。2、tag/矿山副井井筒装备安装/htt...

J5_06关于我们联系我们内容页

1、头尾模板调用代码{$=$take('global.communal.header')}{$=$take('global.communal.footer')}{$ti...

J5模块首页-列表分类-文章页面自定义TDK

J5模块首页-列表分类-文章页面自定义TDK方法1、模块添加字段,后台开发维护》模块管理》右边的设置,在模块设置界面,点击右上角添加新字段按钮添加3个字段,用来存储自定义的TDK数据seotitle,...

J5_08留言模块

联系我们模块放留言板1、/Public/contactus/common/diplomat.index.php文件      $renderer =...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。