Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Messy categories' links
Hi guys, I am having a problem with categories links in a TXP blog.
First of all, I don’t remember how to set up archive pages… I know, I am sorry, but I’m not asking you to write it here. Just a link to read is enough.
Finally, in my blog sidebar, I am using cbs_category_list
plugin to create categories link list but its generated links are something like http://mywebsite.com/blog/?c=news
Why is it messy? Shouldn’t it be something like http://mywebsite.com/blog/category/news
?
Offline
Re: Messy categories' links
caruso_g wrote:
Why is it messy? Shouldn’t it be something like http://mywebsite.com/blog/category/news ?
Unfortunately, no. Textpattern doesn’t provide that type of build in clean URLs for categories. Only categories displayed using the frontpage (default section/page) use clean format. Categories using different section will use messy format.
Offline
Re: Messy categories' links
caruso_g wrote:
but its generated links are something like
http://mywebsite.com/blog/?c=news
Why is it messy? Shouldn’t it be something likehttp://mywebsite.com/blog/category/news
?
I used to have the same question/problem when I was using categories
Here’s the code I used to produce clean urls but also to only list categories with articles
<ul id="categorylist" class="list">
<li><a href="<txp:site_url />">Home</a></li>
<txp:category_list break="">
<txp:variable name="hasarticles" value='<txp:article_custom category=''<txp:category />'' limit="1" />' />
<txp:if_variable name="hasarticles" value="">
<txp:else />
<li><txp:category title="1" link="1" section="default" /></li>
</txp:category_list>
</txp:if_variable>
</ul>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#4 2011-06-19 00:14:15
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Messy categories' links
You can create clean URLs with gbp_permanent_links (e.g. /section-name/category-name/ and /section-name/category-name/article-title).
Offline
Pages: 1