结构
面包屑导航模板_components/breadcrumb.html
需要传入自定义数组,其中数组每项包括text
、link
两个字段,而最后一个数组的link
属性不用设置
# 定义面包屑数组 #
{%
set bcList = [
{text: "首页", link: "/"},
{text: "二级页面位置", link: "###"},
{text: "三级页面位置", link: "###"},
{text: "当前位置 "}
]
%}
{% import "_components/breadcrumb.html" as breadcrumb %}
{{ breadcrumb.render(bcList) }}