Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-10-03 20:32:28

Martagnan
Member
From: Humberside - uk
Registered: 2004-06-21
Posts: 90
Website

Articles by category...

There is probably (hopefully) a really simple solution to this…

I’m using pfa_beginning to list my articles… On the front page are the 3 most recent articles – fine. I want to give visitors the option to filter the listed articles by category. So for example http://www.martagnan.dev/meanderings/?c=family would display only a list of articles assigned to the section ‘meanderings’ and the category ‘family’. Also keeping in mind that i’m using pfa_beginning to output title, excerpt and read more link…

Any help greatly appreciated thanks!

Offline

#2 2005-10-04 11:21:29

Martagnan
Member
From: Humberside - uk
Registered: 2004-06-21
Posts: 90
Website

Re: Articles by category...

ok…..

This is kind of getting me somewhere….

<code>
<txp:if_section name=“meanderings”>
<txp:if_individual_article>
<txp:article />
</txp:if_individual_article>
<txp:if_article_list>
<txp:if_category name=“family”>
<txp:article_custom form=“beginning” limit=“3” section=“meanderings” category=“family” />
</txp:if_category>
<txp:if_category name=“tinternet”>
<txp:article_custom form=“beginning” limit=“3” section=“meanderings” category=“tinternet” />
</txp:if_category>
</txp:if_article_list>
</txp:if_section>
</code>

<br />

Now if I go to www.martagnan.dev/meanderings/?c=family I get just the articles in the ‘family’ category – Hoorah!
Unfortunately I would also like to view ALL articles in the Meanderings SECTION when I am at www.martagnan.dev/meanderings, regardless of category….

Can anyone see what i’m not doing here?

My head now hurts quite a lot….

Last edited by Martagnan (2005-10-04 11:24:50)

Offline

#3 2005-10-04 15:09:50

Martagnan
Member
From: Humberside - uk
Registered: 2004-06-21
Posts: 90
Website

Re: Articles by category...

HOOOOORAY!!!!!!!!!!!!!!!

I’ve done it! I found <a href=“http://forum.textpattern.com/viewtopic.php?id=11375”>THIS THREAD</a> and reading between the lines and using <a href=“http://forum.textpattern.com/viewtopic.php?id=4526”>GLX_IF</a> I managed to solve my problem too!

<code>
<txp:if_individual_article>
<txp:article />
</txp:if_individual_article>
<txp:if_article_list>
<txp:glx_if_section_frontpage>
<txp:article form=“beginning” sortby=“Posted” />
</txp:glx_if_section_frontpage>
<txp:glx_if_category_list>
<h2><txp:c /></h2>
<txp:article form=“beginning” sortby=“Posted” />
</txp:glx_if_category_list>
</txp:if_article_list>
</code>

<br />
Cheers!

Last edited by Martagnan (2005-10-04 15:10:16)

Offline

Board footer

Powered by FluxBB