Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » sub sections?

#1 2006-07-07 15:45:25

tdskate
New Member
Registered: 2006-06-15
Posts: 7

sub sections?

So here’s the deal,
There are 5 sections, they are all displaying their articles directly.
But I only want that on the “news” page…
Other pages should just show the to their articles, and a small text about that certain section – how do i do that?

thx

Offline

#2 2006-07-07 16:54:55

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: sub sections?

WHat do you mean by “articles directly”?

Are the entire articles showing on your landing pages?

Have you tried making a customized excerpt form?

Offline

#3 2006-07-07 17:29:23

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

Re: sub sections?

tdskate wrote:

Other pages should just show the to their articles, and a small text about that certain section – how do i do that?

If I understand you correctly, put this on the section page:
<code>
<txp:if_article_list>
<txp:article status=“sticky” form=“full_article” /></code> (this is your “small text about that certain section”, make that a sticky article)
<code><ul><txp:article listform=“article_list” /></ul>
<txp:else />
<txp:article form=“full_article” />
</txp:if_article_list>
</code>
Your form “article_list” should contain just something like <li><txp:permlink><txp:title /></txp:permlink></li>.

Offline

#4 2006-07-18 09:27:01

tdskate
New Member
Registered: 2006-06-15
Posts: 7

Re: sub sections?

Nice. Thank you very much Els!
Ok, So far so good! Is it possible to keep this same Subnav visible when showing the articles?

Here’s how it looks now:
http://www.suigetsu.be/informatie/

When I click an item in the subnav, the bar dissapears because it’s not defined in the article post. I tried this:
<code>
<txp:if_article_list>
<txp:article status=“sticky” form=“full_article” />
<div id=“subnav”><ul><txp:article listform=“article_list” /></ul></div>
<txp:else />
<div id=“subnav”><ul><txp:article listform=“article_list” /></ul></div>
<txp:article />
</txp:if_article_list>
</code>

Offline

#5 2006-07-18 12:42:03

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

Re: sub sections?

You could try and use <txp:article_custom /> instead.
If each section has it’s own page template, use
<code>
<div id=“subnav”><ul><txp:article_custom section=“name-of-this-section” form=“article_list” /></ul></div>
</code>
If you are using the same page for all sections, use conditionals:
<code>
<txp:if_section name=“informatie”>
<div id=“subnav”><ul><txp:article_custom section=“informatie” form=“article_list” /></ul></div>
</txp:if_section>
<txp:if_section name=“interactief”>
<div id=“subnav”><ul><txp:article_custom section=“interactief” form=“article_list” /></ul></div>
</txp:if_section>
</code>etcetera.

And keep this code outside of the if_article_list conditionals.

Offline

#6 2006-07-18 13:33:26

tdskate
New Member
Registered: 2006-06-15
Posts: 7

Re: sub sections?

There is absolutely no way I could have ever found this on my own. THANK YOU!

Offline

  1. Index
  2. » Archives
  3. » sub sections?

Board footer

Powered by FluxBB