Friendly link tags

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 IDsiteId
    siteIdGenerally, 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 itsiteIdTo implement the data calling the specified site.

linkList will get all the links.

friendLinks is an array object, so it needs to be usedforLoop to output

item is a variable in the for loop body. The available fields are:

  • Link nameTitle
  • Link addressLink
  • Link NotesRemark
  • Link nofollowNofollow

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 %}