Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-04 13:52:27

Simon-a
New Member
Registered: 2006-05-04
Posts: 4

Sections, categories, I don't get it...

Hello (this is my very first post ;-)

I’m trying TP, (http://lykra.celeonet.fr/bifurk) and I was wondering if anyboby can help me, I think it’s a very commun problems, but I’ve haven’t found any post about this (My english is also te-rr-ib-le ;-)

I’ve got 7 sections, with 3 differents categories (I’ve got almost 20 Categories), and I would like to know how I can just show one categories in the first level of one of my section…

I’ve tried something like this :

<code><txp:article_custom form=“default” category=“AGENDA-edito” section=“agenda” sortby=“Posted” sortdir=“desc” listform=“default” /></code>

It works, but then I loose my others categories….

Hope it’s clear, i’ve tried my best :)

Tons of thanks in advance !

Simon

/* edit # 02 You should see the code now, sorry :)

Last edited by Simon-a (2006-05-04 14:39:42)

Offline

#2 2006-05-04 14:17:02

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: Sections, categories, I don't get it...

We can’t see your code yet :)

FAQ: How do I post tags and code on the forum?

Offline

#3 2006-05-04 14:57:07

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Sections, categories, I don't get it...

Do you mean that you want to show just category ‘AGENDA-edito’ on the section homepage?
Try this:
<code>
<txp:if_category>
<txp:article />
<txp:else />
<txp:article_custom category=“AGENDA-edito” section=“agenda” />
</txp:if_category>
</code>
This way, if only the section is requested (lykra.celeonet.fr/bifurk/agenda/) it will use the article_custom tag to display the articles in category ‘AGENDA-edito’. If a category is requested (lykra.celeonet.fr/bifurk/agenda/?c=whatever) the article tag – because it’s context sensitive – will output only articles from that category.

You can leave out the form, listform, sortby and sortdir attributes because you are using the default values.

Edit: there also is a French forum, if you’re feeling more comfortable with that…

Last edited by els (2006-05-04 15:02:36)

Offline

#4 2006-05-09 10:49:50

Simon-a
New Member
Registered: 2006-05-04
Posts: 4

Re: Sections, categories, I don't get it...

Hello,

Thanks a lots for your support, and I’m sorry to have take some time, I was far away from a computer…

For the moment, I found a more simple solution, I’m using Expression Engine in general, so I take me some time to learn TP…
But I have to, TP is free, and very fast even with a cheap hosting solution, which is not true with EE..

Thanks again !

Offline

Board footer

Powered by FluxBB