Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
dumb question about linking pages
I have a section called “Politics” which contains many articles. That section uses the page template “PoliticsPage” which basically shows only the most recent article.
Now, I want to also have a page called “PoliticsArchivePage” that will show all of the articles in the Politics section. I’ve already made this page (in the pages subtab), but how do i link to it? All i want is my archive button to link to the page “PoliticsArchivePage”.
Can I even do this? Do i have to create a section called PoliticsArchivePage?
Any help is much appreciated.
Offline
Re: dumb question about linking pages
I guess what I really need to know is, how do you setup two different pages per section (a standard article page and an archive page) and how do you link from the article page to the archive page….
Offline
#3 2006-09-06 16:29:21
- mstwntd
- Member

- From: Melbourne, Australia
- Registered: 2004-12-25
- Posts: 52
Re: dumb question about linking pages
Hi Adam,
You do not need to create a separate page nor section for the full listing. Here’s a quick example of an archive that uses the same section:
PoliticsPage
<txp:if_individual_article>
<txp:article form="myform" />
<txp:else />
<h1>Latest Article:</h1>
<txp:article form="myform-latest" limit="1" />
<hr />
<h2>Older Articles:</h2>
<ul>
<txp:article form="myform" limit="500" offset="1" />
</ul>
</txp:if_individual_article>
——-
myform
<txp:if_individual_article>
<h1><txp:title></h1>
<small><txp:posted /></small>
<txp:body />
<txp:else />
<li><txp:permlink><txp:title /></txp:permlink></li>
</txp:if_individual_article>
——-
myform-latest
<div class="latest">
<h2><txp:permlink><txp:title /></txp:permlink></h2>
<txp:body />
</div>
myform-latest just allows you to style the first article differently on the main page.
Let me know if you have any problems.
Offline
Re: dumb question about linking pages
thanks! i think i have things working now..
Offline
Pages: 1