Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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!
Sam Brown
sambrown.me | welovetxp.com
Offline
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
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.
Offline