Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-24 08:03:05

gemal
Member
From: Copenhagen, Denmark
Registered: 2007-01-09
Posts: 107
Website

seperating archive and individual

Is it correct that you cant have different pages for the archive and the individual article?

I love like to have:

mysite.com
- uses the default page

mysite.com/blog/
- uses the archive page

mysite.com/blog/1/firstentry
- uses the individual page

this is the way fx MoveableType works and I think the way textpattern works by combining thex archive and the individual page confuses me?

Have I missed something?

I can of cause use the

<txp:if_individual_article> or the <txp:if_article_list>

but I like to have seperate pages

Offline

#2 2007-02-24 12:33:06

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: seperating archive and individual

It thinks of sections as “folders” which hold your articles like sheets of paper. Thus, they use the same page template. Yes, that’s how it works, no that can’t be changed (not at present anyway).

Offline

#3 2007-02-24 15:59:13

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: seperating archive and individual

I go the opposite way, I use one page for everything, so I don’t use the archive page.

What are the advantages of using default and archive?

Offline

#4 2007-02-25 17:46:14

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: seperating archive and individual

Less conditionals, depending upon how you want your site to act.

Offline

#5 2007-02-26 08:05:27

gemal
Member
From: Copenhagen, Denmark
Registered: 2007-01-09
Posts: 107
Website

Re: seperating archive and individual

hcgtv wrote:

I go the opposite way, I use one page for everything, so I don’t use the archive page.

How do you differentiate between the front page, the archive and the individual page?

Offline

#6 2007-02-26 08:27:53

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

Re: seperating archive and individual

<txp:if_article_list />, <txp:if_section />, <txp:if_individual_article />

Offline

#7 2007-02-26 08:52:08

gemal
Member
From: Copenhagen, Denmark
Registered: 2007-01-09
Posts: 107
Website

Re: seperating archive and individual

ruud wrote:

<txp:if_article_list />, <txp:if_section />, <txp:if_individual_article />

I cant get it working.

Coult you post the txp psedo code from your page?

Offline

#8 2007-02-26 09:14:13

anoke
Archived Plugin Author
Registered: 2006-04-15
Posts: 152

Re: seperating archive and individual

Els has a good example at http://forum.textpattern.com/viewtopic.php?pid=135096#p135096.

It works in the page, not in individual article forms. So: if there’s no section selected (if_section is empty) and no category (if_category is empty) is browsed, then (else) we are at the frontpage.

Article listing (there’s no article id in the url) is catched with <txp:if_article_list></txp:if_article_list>, see textbook. And for individual article (there’s id in the url) there’s that <txp:if_invidual_article></txp:if_invidual_article>, textbook here.

It took for me some time to understand this article listing vs invidual article separation. After that’s clear, it gets a lot easier.

Last edited by anoke (2007-02-26 09:22:18)


- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -

Offline

#9 2007-02-26 17:07:36

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: seperating archive and individual

Mary wrote:

Less conditionals, depending upon how you want your site to act.

Early on, I did a comparison of the archive and default pages and found them to be almost identical, I think the title was different. In Textbook and a fresh install of what is to be 4.0.5, they are identical.

So for me, it’s easier to change one page for ongoing site maintenance than to change two.

Offline

Board footer

Powered by FluxBB