display recent articles in my template

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

display recent articles in my template

Post by rbrickyboy »

Hello,
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
Uwe367
Posts: 1125
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.
Image

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

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...
Image

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.
Image

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

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