Previous document tag

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 IDId
  • Document TitleTitle
  • Document LinkLink
  • Document KeywordsKeywords
  • Document DescriptionDescription
  • Document Category IDCategoryId
  • Document ViewsViews
  • Document Cover First ImageLogo
  • Document cover thumbnailThumb
  • Document comment countCommentCount
  • Document added timeCreatedTime
  • Document update timeUpdatedTime

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