Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi
I'm new to CouchCMC and it's very good. I love it. But I have some problems.
I created a blog with help of official documentation and I think it is work pretty well.
But, I need to add my 3 latest blog posts to my Homepage. (When my client posts a new post, It should be come first and older 2 posts should go second and third).
How can I do this? Please give me a little help.
I'm not Very Cleaver with Codes :cry:
(Sorry for BAD English. I think you can understand my Problem)
Hi :)

It is actually covered at several places in the our tutorial (e.g. https://docs.couchcms.com/tutorials/por ... -page.html).

To recap -
If you set the 'masterpage' param of <cms:pages>, you can use it *anywhere* on your site and it will fetch pages from the template indicated by the 'masterpage' param e.g. if you place the following on your home page, it will fetch 3 top pages from the 'blog.php' template -
Code: Select all
<cms:pages masterpage='blog.php' limit='3'>
    .. display as you like ..
</cms:pages>

Hope this helps.
2 posts Page 1 of 1