Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-20 18:00:01

dberthia
Member
From: Minnesota
Registered: 2006-03-08
Posts: 22
Website

Filtering articles by category

I’d like to add a simple dropdown list of categories to the sidebar on my site. When one is selected, I’d like to display a filtered list of all articles in that category. Can anybody provide any guidance and/or examples on how to do this?

- Dave

Offline

#2 2006-09-20 18:14:34

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Filtering articles by category

You can do it with this: <code><txp:popup type=“c” label=“Browse” wraptag=“p” /></code>

It’s the tag on the default template.

Offline

#3 2006-09-20 18:31:55

dberthia
Member
From: Minnesota
Registered: 2006-03-08
Posts: 22
Website

Re: Filtering articles by category

Thank you- that seems to be what I need. One question, though: after I get the filtered list of articles (and they number > 5), and I click on the “Previous page” link, I lose all my CSS formatting. It doesn’t do this if I click the same link from the unfiltered list. Any idea what might be happening? You can get a look at http://www.davesden.com/

Offline

#4 2006-09-20 18:51:15

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Filtering articles by category

Seems like you’re using a non Textpattern CSS tag: <code><link rel=“stylesheet” href=”../css/style.css” type=“text/css” media=“screen” /></code>

When you go to the previous page on a category you get a url like this: http://www.davesden.com/category/Family/?pg=2 and it fails to find the CSS.

Offline

#5 2006-09-20 19:00:58

dberthia
Member
From: Minnesota
Registered: 2006-03-08
Posts: 22
Website

Re: Filtering articles by category

Ah- I see. The relative path to my CSS is messing it up. Thanks for your help.

Offline

Board footer

Powered by FluxBB