Description: Used to retrieve data for the previous document
Usage:{% prevArchive 变量名称 %}
If the variable is defined as prev{% prevArchive prev %}...{% endprevArchive %}
prevArchive does not support parameters.
The fields supported by prevArchive are:
- Document ID
Id
- Document Title
Title
- Document Link
Link
- Document Keywords
Keywords
- Document Description
Description
- Document Category ID
CategoryId
- Document Views
Views
- Document Cover First Image
Logo
- Document cover thumbnail
Thumb
- Document comment count
CommentCount
- Document added time
CreatedTime
- Document update time
UpdatedTime
Code example
{% prevArchive prev %}
上一篇:
{% if prev %}
<a href="{{prev.Link}}">{{prev.Title}}</a>
{% else %}
没有了
{% endif %}
{% endprevArchive %}
Display image
{% prevArchive prev %}
上一篇:
{% if prev %}
<a href="{{prev.Link}}">
<img src="{{prev.Thumb}}" />
<span>{{prev.Title}}</span>
</a>
{% else %}
没有了
{% endif %}
{% endprevArchive %}