Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
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
Re: Category list not working
What do your article tag and form look like?
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
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
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
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
Pages: 1