Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-10 17:42:33

mormir
Member
Registered: 2006-02-15
Posts: 14

Default Category

Hi,
I have on my page (trzewiczek.net) some categories (Like “News” “Scenarios(RPG)” “Articles”). When I start the page, I would like to see list of ONLY “News” articles, and the rest of articles when i chose them in menu. I searched for this in FAQ and Wiki but i didn’t found nothing.

Once I resolved this problem, by using sections, but i have a feeling that there’s better way.

Why I don’t want to use sections? Because it’s not my page, but kind of blog of my friend who publish there a lot of RPG Scenarios, Arts etc. This friend know how to make another kategory in panel, but he is very bad in computers (general), and making another section will be too hard for him (belive me :) ), so that’s why i dont want to use sections.

Could anyone help me?

Offline

#2 2006-03-10 18:05:36

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

Re: Default Category

I think the only way is to use the article_custom tag instead of the article tag: <txp:article_custom category="news" />. You would have to use conditionals then, like
<code>
<txp:if_section name=”“>
<txp:article_custom category=“news” /></code> (add limit, form and other attributes if you wish)
<code><txp:else />
here the article tag for when it’s not the homepage
</txp:if_section>
</code>

Offline

#3 2006-03-10 18:57:12

mormir
Member
Registered: 2006-02-15
Posts: 14

Re: Default Category

No it doesn’t work. When I chose another category, is allways setting it do “News”, so when i click “Scenarios” i see news :( I tried to do something like this:
<code>
<txp:if_section name=”“>
<txp:if_category name=”“>
<txp:article_custom category=“news” />
<txp:else />
here the article tag for when it’s not the homepage
</txp:if_category>
</txp:if_section>
</code>
but it also fail :(

edit:

When it’s:

<code>
<txp:if_section name=”“>
<txp:if_category name=”“>
here the article tag for when it’s not the homepage
<txp:else />
<txp:article_custom category=“news” />
</txp:if_category>
</txp:if_section>
</code>
it’s working. Thanks! without your help i will not made it, because i’m new in textpattern.

Last edited by mormir (2006-03-10 19:05:58)

Offline

#4 2006-03-10 19:35:21

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

Re: Default Category

Ah, well spotted! I forgot the if_category tag. Glad you found it.

Offline

Board footer

Powered by FluxBB