Basic objects
Name | Type | Description |
---|---|---|
cssUrl |
string |
The style file url for knowledge base. |
breadcrumbs |
string |
Breadcrumb Navigation. |
title |
string |
Custom Page Title. |
url |
string |
Custom Page Url. |
categories |
string |
A collection of categories under the current knowledge base. |
articles |
object |
A collection of articles under the current knowledge base. |
breadcrumbs → {string}
Breadcrumb Navigation.
For example:
<div class="breadcrumbs">
{{breadcrumbs}}
<div>
title → {string}
Custom Page Title.
For example:
{{title}}
url → {string}
Custom Page Url.
For example:
<a href="{{url}}">{{title}}</a>
categories → {object}
A collection of categories under the current knowledge base.
Category Object Properties:
Name | Type | Description |
---|---|---|
id |
number |
Category Id. |
name |
string |
Category name. |
url |
string |
Category url. |
parent_id |
number |
The current category's parentId. |
For example:
{% for category in categories %}
<div class="category__item">
<a href="{{category.url}}">{{category.name}}[{{category.total_articles}}]</a>
<div>
{% endfor %}
articles → {object}
A collection of articles the current knowledge base.
Article Object Properties:
Name | Type | Description |
---|---|---|
id |
number |
Article Id. |
title |
string |
Article title. |
url |
string |
Article url. |
if_featured |
boolean |
Flag the article is featured. |
body |
string |
Article body. |
views |
number |
The views of article. |
category_id |
number |
The current artilce's Category Id. |
For example:
{% for article in articles %}
<div class="article-list__title">
{% if article.if_featured %}
<i class="iconfont icon-feature"></i>
{% endif %}
<a href="{{article.url}}">{{article.title}}</a>
</div>
<div class="article-list__content">
{{article.body | truncate:256, "..."}}
</div>
{% endfor %}