How to display pages '5 through 9'..


/ Published in: HTML
Save to your folder(s)

How to display pages '5 through 9'..


Copy this code and paste it in your HTML
  1. {% setcontent records = "pages/latest/10" limit %}
  2.  
  3. {# use 'for' to iterate over the records. #}
  4. {% for record in records %}
  5.  
  6. {# we only want '5 to 9' #}
  7. {% if loop.index >= 5 and loop.index <= 9 %}
  8.  
  9. <article>
  10.  
  11. <h2><a href="{{ record.link }}">{{ record.title }}</a></h2>
  12. {{ record.introduction }}
  13.  
  14. </article>
  15.  
  16. {% endif %}
  17.  
  18.  
  19. {% enfdor %}

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.