Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-11 18:09:10

Neko
Member
Registered: 2004-03-18
Posts: 458

Problem with default page and categories

I have this site with static text on the home page (default page) but I noticed that when I call a page like “category/washington” the static text of home page is still there. I was wondering if there’s a way to tell TXP to not show the static text in categories or how to tell categories to use a different page than default (which contains this damn static text :).

I’ve tried different combinations of conditional tags but I haven’t solved the problem.

Any idea?

Thanks,

Neko

Offline

#2 2005-11-11 22:16:26

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

Re: Problem with default page and categories

<code><txp:if_category>
article tag for category pages
<txp:else />
article tag for home page
</txp:if_category></code>
<br />should do it.

Offline

#3 2005-11-12 01:49:57

Neko
Member
Registered: 2004-03-18
Posts: 458

Re: Problem with default page and categories

That means I’m stupid. O_O I’ve tried 10,000 tags but haven’t thought of that.

Thank you, Doggiez. Gonna try that tomorrow. :3

Offline

#4 2005-11-14 13:08:26

Neko
Member
Registered: 2004-03-18
Posts: 458

Re: Problem with default page and categories

I still have troubles with pages and forms, can anyone point me out in the right direction? Here’s how it looks like:

  1. homepage (default): must show either static text or 1 article categorized as homepage
  2. members: must show a clickable map of my country, and reader clicks a region a new page opens up showing a list of all members from said region
  3. list of members from said region: a list of members (each on is an article) using the categories page (category/category_name). Name and last name are permalinks.
  4. member profile: show bio for that particular member (using title, body and custom fields).

So far I managed to make the following pages working:

  1. works
  2. works
  3. works but shows only one member from that particular region
  4. doesn’t work

Any help is greatly appreciated.

Last edited by Neko (2005-11-14 14:01:54)

Offline

#5 2005-11-14 14:12:25

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

Re: Problem with default page and categories

What if you do something like this:

Tag for the category page:
<code>
<txp:article limit=“nn” form=“member” />
</code>
And the form ‘member’:
<code>
<txp:if_article_list>
<txp:permlink><txp:title /></txp:permlink>
</txp:if_article_list>
<txp:if_individual_article>
<txp:title />
<txp:body />
<txp:custom_field name=“custom1” />
<txp:custom_field name=“custom2” />
</txp:if_individual_article>
</code>

Offline

#6 2005-11-14 15:26:55

Neko
Member
Registered: 2004-03-18
Posts: 458

Re: Problem with default page and categories

Thanks a lot Doggiez. It works perfectly. :)

Offline

Board footer

Powered by FluxBB