Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-08-01 17:46:50
- Lare2
- New Member
- Registered: 2006-07-27
- Posts: 7
Problem Displaying Article Categories
I’m integrating my website with text pattern, i’m new to this system and got stuck with a problem.
I got 3 Article categories as you can see from the screenshot.
<p><a href=“http://img486.imageshack.us/my.php?image=screenshot00001py5.jpg” target=”_blank”><img src=“http://img486.imageshack.us/img486/8522/screenshot00001py5.th.jpg” border=“0” alt=“Free Image Hosting at www.ImageShack.us” /></a></p>
The problem is that when i click any of the categories on the right. txtpattern sends me to the home page instead of showing me the articles for those categories.
<p><a href=“http://img466.imageshack.us/my.php?image=screenshot00002ed7.jpg” target=”_blank”><img src=“http://img466.imageshack.us/img466/8216/screenshot00002ed7.th.jpg” border=“0” alt=“Free Image Hosting at www.ImageShack.us” /></a></p>
So basically localhost and localhost/category/categoryname/ displays the same page.
I asume is trying to use default section to display the articles from the category clicked, but what i have in the default template is the html for my home page.
How can i instruct txtpattern to use other section when displaying categories articles instead of the default. Or it was a mistake on my part by putting the html of my homepage on the default template.
Please shade some light on this problem.
Last edited by Lare2 (2006-08-01 17:49:52)
Offline
#2 2006-08-01 18:43:35
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Problem Displaying Article Categories
If not told otherwise Textpattern uses the default page to display category lists. It is possible to display them on a section page, read the example here.
Offline
#3 2006-08-01 19:06:23
- Lare2
- New Member
- Registered: 2006-07-27
- Posts: 7
Re: Problem Displaying Article Categories
Els wrote:
If not told otherwise Textpattern uses the default page to display category lists. It is possible to display them on a section page, read the example here.
Thanks for your reply.
I read all what’s on the post you linked to, but as Mary responded to PeterH , that solution don’t work with clean urls.
Is there a way to instruct Txp to use another section when displaying category articles. Or my only hope to achieve this is this Plugin
BTW the category links on the right are generated the by the <txp:category_list /> tag
Offline
#4 2006-08-01 19:47:27
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Problem Displaying Article Categories
Just put on your default page:
<txp:if_category>
<!-- we're trying to view an article list -->
<txp:article />
<txp:else />
<!-- we're trying to view the homepage, -->
<!-- put your homepage content here -->
</txp:if_category>
:)
Offline
#5 2006-08-01 20:59:09
- Lare2
- New Member
- Registered: 2006-07-27
- Posts: 7
Re: Problem Displaying Article Categories
Thank you so much. That did the trick.
I’m going to have to invest more time learning the conditional tags of this system, i’m starting to like the flexibility of Text Pattern.
Mary wrote:
Just put on your default page:
<txp:if_category>
<!-- we're trying to view an article list -->
<txp:article />
<txp:else />
<!-- we're trying to view the homepage, -->
<!-- put your homepage content here -->
</txp:if_category>
:)
Offline
Pages: 1