List articles

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
minestrone
Posts: 3
Joined: Fri 11. Aug 2006, 20:07

List articles

Post by minestrone »

How is it possible to list the articles in a certain category so that they all show on the same page? It's similar to blog post entries but without permalinks and comments. And how can it be switched from only a partial view of the body with a link like "Read more..." or the full content? I am not interested to see the summary, only the body and other relevants informations.
Thanks
terry_b
Posts: 32
Joined: Wed 10. May 2006, 05:44

Post by terry_b »

Hi minestrone,

Have you already tried the great {TEASER_EX} tag?

Check it out here: http://www.phpwcms.de/forum/viewtopic.php?t=7503

Cheers,

Terry
minestrone
Posts: 3
Joined: Fri 11. Aug 2006, 20:07

Post by minestrone »

Hi,

That is what I'm looking for, the examples are interesting and I would like to reproduce what is in the Sample news 2 section. I've tried the generator and it works fine except that the body parts of the articles are not showing.

I guess to go further I need to create my own template but have no idea how to achieve that. What are the tags that must be used and where do I put the file? Some examples would be appreciated.

Thanks
terry_b
Posts: 32
Joined: Wed 10. May 2006, 05:44

Post by terry_b »

Hi,

You have to create a template in the folder phpwcms_template/inc_cntpart/articlesummary/list. This is the folder for creating the template to shows articles list. Check the file sample.tmpl for an example on how to create a template and what to use (the sample.tmpl is well documented)

Once you are done, you can regenerate your TEASER_EX tag with the template you created (don't forget the .tmpl when you specify the name of the template)

Here is an example:


the template file I created (file name: newslist.tmpl):

Code: Select all

<table cellspacing="0" cellpadding="0" border="0" width="580">
	<tr>
		<td height="20"  width="565" valign="middle" style="background-color: #F2F2F2;"><strong>{DATE:Y/m/d} - </strong><a href="{ARTICLELINK}">{TITLE}</a></td>
	</tr>
	<tr>
		<td width="580" valign="top">
			{SUB}
			{SUMMARY} <a href="{ARTICLELINK}">{MORE}</a>
		</td>
	</tr>
</table>
<br />


Generated Teaser ex tag:

Code: Select all

{TEASER_EX:news|-1:15:article_created|DESC:0::1::newslist.tmpl:-1::0:0:-1:0:vert}
- where news is the category name containing all the articles I want to list
- where newslist.tmpl is my template file for showing the articles list
minestrone
Posts: 3
Joined: Fri 11. Aug 2006, 20:07

Post by minestrone »

Thanks terry_b, I'll look at that and when I have the time I will try the show_content replacement tag.
Post Reply