Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-08 09:24:35

elwario91
Member
Registered: 2007-07-06
Posts: 42

List of news?

Hello!

On my front page I would like to have a list of the latest news…
The news are in a categroy named “News”.

The latest 5 news will be showed with first the title as link and under the title, the date of publication :)

Can someone help me?

Thanx

Offline

#2 2007-08-08 09:31:42

swati.miniyar
Member
Registered: 2007-08-06
Posts: 39

Re: List of news?

<txp:article_custom form=“news_list” category=“news” />
and form news will contain

<txp:permlink> <txp:title/> </txp:permlink>

Offline

#3 2007-08-08 11:00:11

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: List of news?

This doesn’t show my news…
And I would like to have the link, title and date in a list, <ul><li></li></ul> ;)

Offline

#4 2007-08-08 12:03:30

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: List of news?

how about showing the steps of what you actually tried to do?

Offline

#5 2007-08-08 12:37:10

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: List of news?

Inserted this in my default page:
<txp:article_custom form=“news_list” category=“News” />

And this in the form “news_list”:
<txp:permlink> <txp:title/> </txp:permlink>

Offline

#6 2007-08-08 13:25:51

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: List of news?

Is it also possible to make the list in a <ul>?
Help meeeee!

Offline

#7 2007-08-08 13:32:28

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: List of news?

<ol><txp:article_custom form=“news_list” category=“News” /></ol>
<li><txp:permlink> <txp:title/> </txp:permlink></li>

For showing the date, look at the list of tags and their explanations here (<txp:posted /> is the one you’re looking for)

Offline

#8 2007-08-08 13:47:04

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: List of news?

I don’t understeand, it doesn’t work :’(

This is what I did:
Created a category named “News”
Published an article in this category
Inserted this in the default style:
<ol><txp:article_custom form=“news_list” category=“News” /></ol>
This in the form named news_list:
<li><txp:permlink> <txp:title/> </txp:permlink></li>

But I have nothing on screen and the source only provides this: <ol></ol>, so I presume the form works :S

Offline

#9 2007-08-08 13:53:04

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: List of news?

Do you have any articles with the category “News” that is set to a section which has articles on the front page (assuming you’re trying this on the front page)?

a tag trace would be helpful

Offline

#10 2007-08-08 13:54:03

elwario91
Member
Registered: 2007-07-06
Posts: 42

Re: List of news?

What do you mean with: which has articles on the front page?

Offline

#11 2007-08-08 13:57:29

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: List of news?

In the sections tab, you can specify whether articles for a specific section also appear on the front page…. although, since you’re using article_custom instead of article, that’s not a requirement to make this work. Still, a tag trace would be nice.

Last edited by ruud (2007-08-08 14:13:17)

Offline

Board footer

Powered by FluxBB