Notice: PyroCMS v 2.2.x is depreciated and is no long under development. This documentation is provided as-is, free of charge, for reference in existing websites.


{{ blog:posts }}

Display all blog posts or blog posts by category.


The blog plugin is powered by streams, so it can take all of the parameters that the streams cycle can take except for stream, namespace, and where.

In addition the following extra parameters are available:

Name Default Required Description
category All Categories No Display posts from this category only.


{{ blog:posts limit="5" offset="5" order_by="title" category="pyrocms" }}
	<h2>{{ title }}</h2>
	<p>{{ intro }} <a href="{{ url }}" title="Read more about: {{ title }}">Read more</a></p>
	<p>Written by: <a href="/users/view/{{ author_id }}">{{ user:display_name user_id=author_id }}</a></p>
{{ /blog:posts }}


{{ blog:categories }}

Display all blog categories available.


Name Default Required Description
limit 10 No The maximum number of categories to display.
order-by created_on No Choose which column to sort by. (id, title, slug)
order-dir asc No The direction to sort results by. (asc, desc)


	<li><a href="/blog" class="button">All categories</a></li>
	{{ blog:categories order-by="title" limit="5" }}
	<li><a href="{{ url }}" class="button {{ slug }}">{{ title }}</a></li>
	{{ /blog:categories }}