Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-07-31 21:32:31

cmscritic
Member
From: Edmonton, Alberta, Canada
Registered: 2009-07-09
Posts: 29
Website

Category list not working

I have a widget that points to <txp:category_list break=“li” wraptag=“ul” /> in my sidebar.. however, clicking on any of the categories listed there brings up a blank page.

Can someone provide some hints ?

http://thatcriticguy.com is the site in question

Offline

#2 2009-07-31 21:40:41

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Category list not working

What do your article tag and form look like?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#3 2009-07-31 21:42:37

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Category list not working

Put the site into debugging mode, then we can look at the tag trace and help you figure it out.

If you started by modifying the default page from a fresh Txp install, possibly you deleted the <txp:article /> tag from the true portion of the if_category block. Search works, so clearly there’s at least one article tag still on the page.


Code is topiary

Offline

#4 2009-07-31 21:51:33

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: Category list not working

Assuming you don’t have any tags present in your page to handle category output:

You can use txp:if_category to determine whether it is a category or not (It is when you click on one). This can go in your page where you want to check for categories.

You can use txp:if_individaual_article to display an individual article.

You can use forms to set up what an individual article looks like and what a list of articles looks like.

<txp:if_individual_article>
<txp:article form=“individual_article” />
<txp:else />
<txp:article form=“article_list” />
</txp:if_individual_article>

Last edited by whaleen (2009-07-31 21:53:01)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#5 2009-07-31 21:52:42

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

Re: Category list not working

If you add section="articles" to the category_list tag the links will point to /articles/?c=category-name and those pages seem to display your articles fine.
If you don’t specify the section in the category_list tag, it will generate links (/category/category-name/) that use the front page by default; I assume your section ‘articles’ is set to not to be displayed on the front page, which explains the empty pages.

Offline

#6 2009-08-01 00:25:22

cmscritic
Member
From: Edmonton, Alberta, Canada
Registered: 2009-07-09
Posts: 29
Website

Re: Category list not working

Els: That is correct, articles was set to not show on the front page as I want that static. I added section=“articles” as you suggested to the category list tag and she works beautifully now.

Thanks everyone for the awesome assistance. Much appreciated!

Offline

Board footer

Powered by FluxBB