Looping over Blog Data

  1. 3 years ago


    19 Feb 2015 Administrator

    In your default.twig (or any of the twig files you have) code in the looping Twig loop:

    	<h1>Blog post loop</h1>
    		{% for post in plugins.blog.posts %}
    		{% endfor %}

    There is a load of data that can be pulled from a Blog post. Information can be found here: http://docs.basekit.com/data/plugin/#blog

    Important: You should note that the post will only contain the latest posts. The number of those posts are dictated by the blog settings within the editor. In the current version (7.50) this is either 5, 10, 25, 50.

    The only place where this changes will be in the blogpostlist.twig. The BaseKit engine throws through the posts related to the pagination. i.e. 10 posts from 20-30 if on page 3.

or Sign Up to reply!