参数说明:
参数名 | 参数类型 | 默认值 | 是否必须 | 说明 |
isRoot | 布尔 | false | X | 是否显示根栏目 |
isPage | 布尔 | false | X | 是否分页 |
page | 数字 | 1 | X | 起始页 |
pageSize | 数字 | 10 | X | 每页多少条 |
count | 数字 | 1 | X | 显示多少条 |
categoryIds | 数字 | 当前栏目ID | X | 栏目ID |
categoryPaths | 文字 | 当前栏目访问路径 | X | 栏目访问路径 |
articleId | 数字 | 当前文章ID | X | 文章ID |
代码1:
<@categoryList isRoot="true" count="6">
<#list list as l>
<#if (l_index)%2==0><div></#if>
<a href="${baseSite}${l.path}" data-role="none">${l.name}</a>
<#if (l_index)%2!=0></div></#if>
</#list>
</@categoryList>
代码2:
<@categoryList isRoot="false" categoryPaths="product">
<#list list as l>
<li><a href="${baseSite}${l.path}">${l.name}</a></li>
</#list>
</@categoryList>