Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-10-10 14:46:26

majkinetor
Member
Registered: 2007-10-10
Posts: 13

"If individual article" problem

Hello there

Situation
I have section MySection which contains N sticky articles.

My section uses page which I defined as:

<txp:if_individual_article>
   <txp:body>
<txp:else />
   <txp:article_custom form="article_overview" pgonly="0" section="MySection" status="5" />
</txp:if_individual_article>

Article overview is the form listing only article title and excerpt.

The home page (default) is just listing all sections with <txp:section_list />

The problem
When I select MySection from the menu provided by section_list it shows the article_overview form with correct output – only sticky articles with excerpt. When I click the sticky article I expect to see its body on the next page due to the if_individual_article in my page template but I only receive Article tags cannot be used outside an article context and Page template does not contain a txp:article tag. I thought that inside if_individual_article tag, I will be in article context.

What should I do to correct this, so it shows the body of the clicked sticky article

Thanks.

Last edited by majkinetor (2007-10-10 15:14:11)

Offline

#2 2007-10-10 15:06:53

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: "If individual article" problem

majkinetor,
you must change your page code to this:
<txp:if_individual_article>
<txp:article form=“your-single-article-form”>
<txp:else />
<txp:article_custom form=“article_overview” pgonly=“0” section=“MySection” status=“5” />
</txp:if_individual_article>

and then create the“your-single-article-form” form which contains:
<txp:body>

Offline

#3 2007-10-10 15:09:59

majkinetor
Member
Registered: 2007-10-10
Posts: 13

Re: "If individual article" problem

Argh… thx. :)

Offline

Board footer

Powered by FluxBB