Previous document tag

Description: Used to obtain data from the previous document

How to use:{% 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 view countViews
  • First image of the document coverLogo
  • Document cover thumbnailThumb
  • Number of document commentsCommentCount
  • Document addition timeCreatedTime
  • Document update timeUpdatedTime

Code Example

{% prevArchive prev %}
上一篇:
{% if prev %}
  <a href="{{prev.Link}}">{{prev.Title}}</a>
{% else %}
  没有了
{% endif %}
{% endprevArchive %}

Show pictures

{% prevArchive prev %}
上一篇:
{% if prev %}
  <a href="{{prev.Link}}">
    <img src="{{prev.Thumb}}" />
    <span>{{prev.Title}}</span>
  </a>
{% else %}
  没有了
{% endif %}
{% endprevArchive %}