Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2005-12-23 23:48:39
- sunmaker
- Member
- From: Washington DC
- Registered: 2005-01-04
- Posts: 40
Category Links Vs. Clean URLs
Hello, my URLs are set to /title.
But txp:category1 link=“y” outputs URL/category/nameofcategory.
So the links don’t do anything. I need them to display the articles that are assigned the clicked category.
Thanks.
Last edited by sunmaker (2005-12-23 23:49:18)
All boundaries are for practical purposes only.
Offline
Re: Category Links Vs. Clean URLs
<blockquote>So the links don’t do anything.</blockquote>
I don’t understand what you mean here. Could you elaborate, please, or provide an example?
Offline
#3 2005-12-24 03:06:08
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Category Links Vs. Clean URLs
They don’t show anything, not because of your url scheme, but because you need to add some conditional logic to your “default” page. Use if_category without the “name” attribute, along with article.
Offline
#4 2005-12-24 03:18:16
- sunmaker
- Member
- From: Washington DC
- Registered: 2005-01-04
- Posts: 40
Re: Category Links Vs. Clean URLs
Thank you! I will study the TextBook articles you indicated. Glad to hear that the URL scheme is not the issue.
All boundaries are for practical purposes only.
Offline
Re: Category Links Vs. Clean URLs
I’m having the same problem… Tried to use if_category too but it doesn’t work… I put on default page
<code>
<txp:if_category>
<txp:article limit=“10” />
…your content here…
<txp:else />
<txp:article limit=“1” status=“sticky” form=“static_article” />
<txp:category_list />
</txp:if_category>
and when I click on a category link, I just get “…your content here…” but cannot get articles…
My default form is
<txp:if_article_list>
<!— list page: display the short version —>
<h2><txp:permlink><txp:title /></txp:permlink></h2>
<txp:excerpt />
<p><i><txp:permlink>[Read more…]</txp:permlink></i> | <i><txp:posted /></i> | <i><txp:category1 /></i> | <i><txp:comments_invite /></i></p>
</txp:else />
<!— article page: display the complete article —>
<h2><txp:permlink><txp:title /></txp:permlink></h2>
<txp:body />
<p><i><txp:posted /></i> | <i><txp:category1 /></i></p>
</txp:if_article_list>
</code>
On the other hand, when using cbs_category_list everything works fine… Note, all articles belong to different sections – might that be a cause of the problem?
for example,
this works:
http://davors.com/blog/?c=UML
this does not work:
http://davors.com/category/UML/
Thanks,
Davor
Last edited by davor (2005-12-25 18:35:36)
Offline
#6 2005-12-25 19:37:32
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Category Links Vs. Clean URLs
davor wrote:
Note, all articles belong to different sections – might that be a cause of the problem?
for example,
this works:
http://davors.com/blog/?c=UMLthis does not work:
http://davors.com/category/UML/
Yes, that’s probably the problem. Category lists use the ‘default’ section (front page, your second example), and sections have to be set to show on the front page to actually be displayed (in presentation > sections). If you change this, the code you have should work.
Offline
Re: Category Links Vs. Clean URLs
Great, thanks! Setting to show on the front page fixed the problem!
Davor
Offline
Pages: 1