Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-05-08 15:34:34
- bill
- New Member
- Registered: 2005-10-12
- Posts: 4
How to automatically list all articles in a section on one page?
I use this to make a section list:
txp:section_list
So it outputs links to sections; But the links go to an empty page.
How do you get TXP to automatically output a page listing the articles in a section?
This must be a feature – but I haven’t found it.
Thanks in advance for any ideas…
~B
Offline
Re: How to automatically list all articles in a section on one page?
More details please.
When you go to those section pages in any other way is there content on those pages?
Do you have <txp:article />
somewhere on each section’s page?
Offline
#3 2006-05-08 16:24:36
- bill
- New Member
- Registered: 2005-10-12
- Posts: 4
Re: How to automatically list all articles in a section on one page?
<p>Hi Mr. Dale,<br />
Thanks for the reply.</p>
<p>Ok…<br />
More details:</p>
<p>On my section page I have this:<br />
txp:article form=”sub-page-article” sortby=”Posted” sortdir=”desc” listform=”sub-page-article”</p>
<br /><br />
<p>And the form ‘sub-page-article’ are these:<br />
txp:permlink<br />
txp:title <br />
txp:custom_field name=”custom1”<br />
txp:excerpt<br />
/txp:permlink</p>
<br /><br />
<p>and this is Textpattern · 4.0.2</p>
<p>The test site is secretinformationclub.com</p>
<p>The exhibition section shows the problem. The other ‘section pages’ are a short term solution. They were made by writing an article with the same name as the section, and then writing links to the other articles in each section. This works, but it’s going to be a chore long term.</p>
Last edited by bill (2006-05-08 16:33:30)
Offline
#4 2006-05-08 18:17:18
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How to automatically list all articles in a section on one page?
The code you have should work. A couple of checks:
- is the right template assigned to section ‘exhibitions’? You can try typing in some text, like ‘this is section exhibitions’ in the content div on your ‘exhibition’ template. Does it show when you go to the section page?
- could it be that your articles have future dates? In that case you have to add time=“future” or time=“any” to the article tag
And I think you can build the other section pages easily with article tags and maybe some conditionals. But first things first ;)
Offline
#5 2006-05-08 20:01:30
- bill
- New Member
- Registered: 2005-10-12
- Posts: 4
Re: How to automatically list all articles in a section on one page?
Thanks Els; Check on both counts (Thanks for the time=any tip which will help me fill the calendar section with future dates).
As far as my page templates go…
I have just 3 pages:- Default (for the homepage)
- Subpage
- Error
My default section uses the page “Default”
All the other sections use the page “Subpage” (with the article tag from my earlier post)
This is a rather efficient model I think.
I just tried copying the subpage to it’s own section template, but the section listing is still empty.
Last edited by bill (2006-05-08 20:09:18)
Offline
#6 2006-05-08 20:18:12
- bill
- New Member
- Registered: 2005-10-12
- Posts: 4
Re: How to automatically list all articles in a section on one page?
Problem found.
Thanks for your ideas; Knowing that it should have worked with the section/page/article-tags was VERY helpful.
I found a hidden article with the url exhibitions.
I gave it a new, completely different url and now it’s working perfectly.
Debugging successfull.
Thanks for the pointers…
~Bill
Offline
#7 2006-05-08 20:30:44
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How to automatically list all articles in a section on one page?
Good :)
Offline