Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2007-01-26 23:06:53

Zarathu
Member
Registered: 2006-08-12
Posts: 35

Re: ...view all posts of a certain category?

Here… Let me explain what I mean.

www.omreview.com

Go to “Artists.” You notice those? Each artist is a category. Click the artist. Notice that nothing happens? Jm’s code doesn’t help me in that regard.

Offline

#14 2007-01-27 12:11:23

anoke
Archived Plugin Author
Registered: 2006-04-15
Posts: 152

Re: ...view all posts of a certain category?

Are the category name and title the same? How do you make that artist category list? What is the code for that? Can you link to the page code? (i prefer linked files to huge forum posts myself…)

And just to be bluntly sure – you have posts in those categories right? Otherwise you will be getting empty pages when browsing categories…


- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -

Offline

#15 2007-01-27 22:46:20

Zarathu
Member
Registered: 2006-08-12
Posts: 35

Re: ...view all posts of a certain category?

Yes, I have pages in those categories. The artist name is the same as the category name—all of which are article categories.

That artist category list is created manually in a separate page.

Offline

#16 2007-01-28 11:46:10

anoke
Archived Plugin Author
Registered: 2006-04-15
Posts: 152

Re: ...view all posts of a certain category?

Separate page? You have <txp:article /> tag on that page after category listing?


- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -

Offline

#17 2007-01-28 15:43:47

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: ...view all posts of a certain category?

If you’re using <txp:category_list /> make sure you have the ‘section’ attribute in there, otherwise it will lead to your default page.

Offline

#18 2007-01-29 22:41:51

Zarathu
Member
Registered: 2006-08-12
Posts: 35

Re: ...view all posts of a certain category?

Great, but here’s something I think we’re overlooking:

index.php?c=CATEGORY_NAME

^ This does not function. Category_list is great, but it brings up a bunch of links to index.php?c=CATEGORY_NAME, which does not function. It just brings up blank.

Offline

#19 2007-01-29 23:04:44

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: ...view all posts of a certain category?

<txp:category_list section="artist" /> will give you links like index.php?s=artist&c=category-name. You’ll need the proper article tag(s) on your artist section page of course.

Offline

#20 2007-01-30 22:37:25

Zarathu
Member
Registered: 2006-08-12
Posts: 35

Re: ...view all posts of a certain category?

Excellent!

Question: How would I pull off index.php?s=<section_name>&c=CATEGORY NAME if the CATEGORY NAME has a space in it?

Offline

#21 2007-01-31 14:55:13

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: ...view all posts of a certain category?

Category name shouldn’t contain a space (nor capitals, for that matter), if it does you’d better change it (content > organize). If your category title is something like ‘This category’, change the name to ‘this-category’.

Offline

Board footer

Powered by FluxBB