display recent articles in my template

post everything related to phpwcms templates here
Post Reply
Posts: 14
Joined: Wed 22. Aug 2012, 17:35

display recent articles in my template

Post by rbrickyboy »

I was thinking of adding recent article on my template, I prefer to put it on another column of my website.
any idea on how to implement this?

Kind regards,
User avatar
Posts: 1116
Joined: Sat 15. Sep 2007, 07:19
Location: Koblenz

Re: display recent articles in my template

Post by Uwe367 »

If i want to put specific content into an other column, i use costumblocks to realize this. Standartblocks are {HEADER} {LEFT} {CONTENT} {RIGHT} {FOOTER} but you also can define your own custom blocks in Page Layout like the screenshot shows.

After saving page layout the blocks will be avaiable in main template, see the next screenshot please...

The only thing you have to do manually is to put the placeholder {MY_BLOCK1} in the Field. There you also can format it with css and so on. Look at the screenshot...

These Placeholders of your created blocks you can place at every place in your templates. You can place them in the main template where your specific content should be shown, you also can place them in CP Templates, you also can place it, for example, in an HTML CP to show the content of this block in an other ones. There are much possibilities given, but to understand it, place it at first in your main template.
For example i placed it near {CONTENT} in main template. That makes there no sense, it´s only to show you one possibility.

In the Contentpart, here for example wysiwyg, you have to choose the Block in that your content should be shown...

You can place those blocks where you want to give out your specific content at that place you want. Hope that was what you meaned and helps you a little bit.
Here it is explained in Wiki:
https://wiki.phpwcms.org/doku.php/engli ... tom_blocks
Post Reply