Description: Used to obtain a list of friendly links
How to use:{% linkList 变量名称 %}
If you define a variable as friendLinks{% linkList friendLinks %}...{% endlinkList %}
The supported parameters of linkList are
- Site ID
siteId
siteId
Generally, there is no need to fill in it. If you use the background multi-site management to create multiple sites and want to call data from other sites, you can specify itsiteId
To implement the data calling the specified site.
linkList will get all the links.
friendLinks is an array object, so it needs to be usedfor
Loop to output
item is a variable in the for loop body. The available fields are:
- Link name
Title
- Link address
Link
- Link Notes
Remark
- Link nofollow
Nofollow
Sample code
{% linkList friendLinks %}
{% if friendLinks %}
<div>
<span>友情链接:</span>
{% for item in friendLinks %}
<a href="{{item.Link}}" {% if item.Nofollow == 1 %} rel="nofollow"{% endif %} target="_blank">{{item.Title}}</a>
{% endfor %}
</div>
{% endif %}
{% endlinkList %}