Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-15 16:20:41

Sam
Member
From: New York City
Registered: 2004-06-26
Posts: 127
Website

Stop viewing of /section but not /section/article

I have my Textpattern 4.0.4 site set up with articles in sections like so /section_name/article_title.

There are usually quite a few articles in each section, however if someone were to visit just /section_name with no article title afterwards they receive a list of all articles in this section.

I would like to stop this happening if possible. Visiting /section_name would either redirect elsewhere or have custom text there.

Is this possible? Is there a better way to be structuring my site?

I have 1 presentation template file, the default, which uses <txp:article limit="6" />.

Thanks for your help!

Offline

#2 2007-03-15 16:27:00

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Stop viewing of /section but not /section/article

Check out this thread it covers almost the same idea.


Shoving is the answer – pusher robot

Offline

#3 2007-03-15 16:48:41

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Stop viewing of /section but not /section/article

Sam wrote:

I would like to stop this happening if possible. Visiting /section_name would either redirect elsewhere or have custom text there.

Is this possible? Is there a better way to be structuring my site?

I have 1 presentation template file, the default, which uses <txp:article limit="6" />.

You can try this:

<txp:if_article_list>
your custom text/html/textpattern-tags here
<txp:else />
<txp:article />
</txp:if_article_list>

A /section_name URL is an article list context.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB