Content

Module to show content, like pages, posts and products

<module type="content" /> 

Module parameters

This module works out of the box without any parameters. All the parameters bellow are optional.

parameter description optional values
content-type the type of the content page,post,product, anything custom
subtype the sub-type of the content post,product, anything custom
parent the id of the parent page any valid page id
category get posts from a category any valid category id
limit limit the number of results example: limit="3"
current-page used together with "limit" if you want to get more of the results example: limit="3" current-page="2"
hide-paging if you set it it will hide the paging buttons
order-by allows you to sort posts by any db field example: order-by="position desc"
show shows only certain information thumbnail, title, description, read_more
template set module template if you wish or create your own default templates are: default, masonry, search

Examples

Get a list of pages

<?php //shows pages ?>
<module type="content" content-type="page" />

Show only the main pages

<?php //shows main pages ?>
<module type="content" content-type="page" parent="0" />

Get list of posts and apply module template

<?php //shows posts ?>
<module type="content" content-type="post" template="sidebar" />

Limit the number of results and sort by date

<?php //shows all content by last edited ?>
<module type="content" limit="5" hide-paging="true" order-by="updated_on desc" />

Get posts from category

<?php //shows all posts from a category ?>
<module type="content" content-type="post" category="22" />

Get content and limit the results

<?php print "Results page 1"; ?>
<module type="content" limit="2" current-page="1" />

<?php print "Results page 2"; ?>
<module type="content" limit="2" current-page="2" />

Show only certain fields

<?php //shows only some fields ?>
<module type="content" content-type="page" parent="0" show="title,thumbnail,read_more" />