Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-11-02 10:56:22
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
Page template default does not contain a txp:article tag
in individual article page i get this error message:
tag error: -> Textpattern Notice: Page template default does not contain a txp:article tag on line 514
but i do have a txp:article tag in template page:
<div id="sidebar-1">
<txp:if_section name=" ">
<txp:article_custom section="tutvustus" />
<txp:else />
<txp:if_section name="tutvustus,teenused">
<txp:output_form form="tagasiside" />
<txp:else />
</txp:if_section>
</txp:if_section>
</div>
<!-- content -->
<div id="content">
<txp:if_section name=" ,teenused">
<txp:article_custom section="teenused" form="default-h2" />
<txp:else />
<txp:article limit="1" />
</txp:if_section>
</div>
what i’m missing here?
Offline
Re: Page template default does not contain a txp:article tag
Hi
add at the end of your code:
<txp:if_individual_article>
<txp:article />
</txp:if_individual_article>
Offline
#3 2010-11-02 17:27:10
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Page template default does not contain a txp:article tag
Gallex wrote:
but i do have a txp:article tag in template page:
Not if you’re in section ‘teenused’ ;)
<txp:if_section name=" ,teenused">
<txp:article_custom section="teenused" form="default-h2" />
<txp:else />
<txp:article limit="1" />
</txp:if_section>
</div>
Offline
#4 2010-11-03 11:05:06
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
Re: Page template default does not contain a txp:article tag
am i blind or….but i can’t see any differences between mine and your code?
Offline
#5 2010-11-03 17:35:07
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Page template default does not contain a txp:article tag
It is your code ;) But the link you gave goes to an individual article in secton ‘teenused’, and your code provides an article_custom tag in that section, not an article tag.
Offline
#6 2010-11-04 09:25:03
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
Re: Page template default does not contain a txp:article tag
Els wrote:
It is your code ;) But the link you gave goes to an individual article in secton ‘teenused’, and your code provides an article_custom tag in that section, not an article tag.
i thought
...
<txp:else />
<txp:article limit="1" />
...
do the job… ;)
but, thank’s for directing to right direction. the final working code:
<div id="sidebar-1">
<txp:if_section name=" ,tutvustus">
<txp:if_individual_article>
<txp:article />
<txp:else />
<txp:article_custom section="tutvustus" />
</txp:if_individual_article>
<txp:else />
<txp:output_form form="tagasiside" />
</txp:if_section>
</div>
<!-- content -->
<div id="content">
<txp:if_section name=" ,teenused">
<txp:if_individual_article>
<txp:article />
<txp:else />
<txp:article_custom section="teenused" form="default-h2" />
</txp:if_individual_article>
<txp:else />
<txp:output_form form="tagasiside" />
</txp:if_section>
</div>
correct?
Offline
#7 2010-11-04 18:25:05
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Page template default does not contain a txp:article tag
Gallex wrote:
i thought
... <txp:else /> <txp:article limit="1" /> ...
do the job… ;)
Not exactly, because the part after <txp:else />
is only displayed when not in section default or teenused.
correct?
Looks good ;)
Offline