Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-06-24 17:38:51

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Question on txp:article and txp:category1

I am using the latest SVN revision on a live test site, and have come across a possible bug.

If I use this code category1 displays the correct category name:

<txp:if_section name="my-section">
<txp:article limit="1" form="my-form" >
<h2><txp:title /></h2>
<p class="post">Category: <txp:category1 link="1" title="1" section="my-section" /></p>
<txp:body />
</txp:article>
</txp:if_section>

But, if I use this:

<txp:if_section name="my-section">
<txp:article limit="1" form="my-form" />
</txp:if_section>

With form my-form contents:

<h2><txp:title /></h2>
<p class="post">Category: <txp:category1 link="1" title="1" section="my-section" /></p>
<txp:body />

Then the category1 is a different category. Head scratch!!

I presume that placing attributes within a container tag takes precedence over the form=“my-form” attribute in a single tag, but the category should still be the same..

Offline

#2 2009-06-25 10:48:31

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,324
Website Mastodon

Re: Question on txp:article and txp:category1

Thanks for the report. You can watch its progress in the issue tracker

Offline

Board footer

Powered by FluxBB