Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-03 13:52:33

DeRRudi
New Member
Registered: 2006-05-03
Posts: 2

category does not work?

Hi all,

At the frontpage i want to check if a category is selected. If so, it should show a different form. so i included the next lines:
<code>
<txp:if_category name=“Nieuws”> <txp:article_custom form=“default” limit=“3” category=“Nieuws” sortby=“Posted” sortdir=“desc” listform=“default” />
</txp:if_category>
<txp:if_category name=“Agenda”> <txp:article_custom form=“agenda” limit=“100” category=“Agenda” sortby=“Posted” sortdir=“desc” listform=“agenda” />
</txp:if_category>
</code>
I expected that if i for example go to: http://<mysite>/category/Agenda it should show the different form. But it does not work. If i use http://<mysite>/?c=Agenda it does work!
The links to the categories are created by txp selve. Anybody know what i do wrong?

Greetz Rudi

(edited to show your code. -Els)

Last edited by els (2006-05-03 14:37:36)

Offline

#2 2006-05-03 14:47:01

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

Re: category does not work?

DeRRudi wrote:

I expected that if i for example go to: http://<mysite>/category/Agenda it should show the different form. But it does not work.

Do you mean that nothing is displayed or that the articles are displayed but with the wrong form?

If i use http://<mysite>/?c=Agenda it does work!

How are the category links generated? With <txp:category_list /> or <txp:category link="1" /> or just with a href= etcetera? If you handcoded them I’d think that you might not be able to use clean url’s. But if they are generated by Textpattern tags that can hardly be the problem.

Offline

#3 2006-05-03 19:40:50

DeRRudi
New Member
Registered: 2006-05-03
Posts: 2

Re: category does not work?

There are articles displayed but with the wrong form!
The links are generated by Textpattern tags.

Offline

#4 2006-05-03 19:59:36

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

Re: category does not work?

<txp:if_category name="Nieuws">
<txp:article limit="3" />
</txp:if_category>

<txp:if_category name="Agenda">
<txp:article limit="100" form="agenda" />
</txp:if_category>

Offline

Board footer

Powered by FluxBB