Previous Document Tag

Description: Used to get the previous document data

Usage:{% prevArchive 变量名称 %}If the variable is defined as prev{% prevArchive prev %}...{% endprevArchive %}

prevArchive does not support parameters.

prevArchive supports the following fields:

  • Document IDId
  • Document titleTitle
  • Document linkLink
  • Document keywordKeywords
  • Document descriptionDescription
  • Document Category IDCategoryId
  • Document ViewsViews
  • Document cover first imageLogo
  • Document cover thumbnailThumb
  • Document comment countCommentCount
  • Document add 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 %}