Page 1 of 1
How to display category title in an article list
Posted: Tue 25. Oct 2005, 12:47
by jlbach
I'd like to display the category title in a list of articles (all articles of this category).. Can anybody help me?
This is the page where I need the tittle:
http://www.lestany.net/life/index.php?noticies
I'd like something like:
Title Category
---
Title article 1
sumary article 1
Title article 2
sumary article 2
Title article 3
sumary article 3
...
Thanks
Posted: Tue 25. Oct 2005, 13:07
by pepe
If you know, how to do such lists... you have done 90% of your work
The rest is easy...
make an new template (news_Titel.tmpl), in which you include only the title and may be a subtitle....
Write a separarte artikel, into which you put in only the Artikle title,
connect this article whith your new list-template (news_Titel.tmpl) and moove it to the top of your Articles inside the overview- or news-archive
Works perfekt, but only if the sortorder is manual.. to keep the "Titel-Artikle" on top.
Somthing like :
<!--
===== news_Titel.tmpl =====
//-->
<div style="padding-bottom:25px;">
[TITLE]<h1>{TITLE}</h1>[/TITLE]
[SUB]<h2>{SUB}</h2>[/SUB]
</div>
Posted: Tue 25. Oct 2005, 15:53
by jlbach
Thanks for your answer, Pepe.
If you know, how to do such lists... you have done 90% of your work
Well.. not really.. The list appears if the category contains more than one article.
I'm a newbee on phpwcms and I'm not sure to understand what I have to do.. I thought to build a new template wich contains the title of the category, but I don't know how to do it. This structure ("Category title + article list) will be used in several parts of the web, and in several languages. So I was looking for a way wich allow to show article list with the category title at the top..
If there was a tag to replace the category tittle I think than building a new template and adding this tag just before {CONTENT} would be a solution. I have tried it, but with no success.
Here is the list I'd like to obtain
http://www.lestany.net/life/index.php?noticies
In the template I have used here, I typed the Title "NotÃcies". But it is not a title variable.
(it's hard to express myself in English.. I hope you will understand what I mean, sorry)
Posted: Thu 15. Dec 2005, 19:02
by jlbach
Thanks again pepe.
I have applied your solution, writing a new template, as you say.
But it has the inconvenient that then title is listed as an article if "list of articles" is used..
Do you know if there is any tag to print the category name?
Thank you