Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-11-13 21:16:39

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 208
Website

Clean url from category link to section

Hi! I got this:

<txp:if_article_category>
	<txp:category1 section="autor" title="1" link="1" /><txp:if_article_category number="1"><txp:if_article_category number="2">, </txp:if_article_category></txp:if_article_category><txp:category2 title="1" link="1" />
</txp:if_article_category>

And when I click on category1 I go to autor/?c=autor-name

Is there a way to have autor/autor-name and get rid of “?=

Thank you in advance

Last edited by robhert (2012-11-13 21:17:35)

Offline

#2 2012-11-13 21:24:54

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

Re: Clean url from category link to section

gbp_permanent_links can do that, you can set it to use /section/category/ URLs.

Last edited by els (2012-11-13 21:27:13)

Offline

#3 2012-11-13 21:43:58

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 208
Website

Re: Clean url from category link to section

Hi Els! Thank you for answering.

I tried gbp_permanent_links with no success. Now I got this index.php?s=autor&c=autor-name I dont know how to use that pluggin. I’m still looking in the forum for something that shows me how to use gbp_permanent_links.

Offline

#4 2012-11-13 23:19:56

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

Re: Clean url from category link to section

The plugin has no documentation, that makes it a bit difficult to understand. But you can post your questions in the plugin thread and most of the time they will be answered by someone :)

In short:
  • go to Admin > Permanent links > Build
  • create a /section/category/ permanent link rule
  • under Settings, give it a name (you can forget about Precedence if you have only one rule)
  • under Conditions, choose the section where this rule must be applied
  • save it

And that should be all. Links to category pages in this section, generated by Txp tags, should automatically link to /section/category/ now.

Last edited by els (2012-11-13 23:20:53)

Offline

#5 2012-11-14 03:14:18

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 208
Website

Re: Clean url from category link to section

Thank you Els! I’m going to test it tomorrow. I gave up this for today.

Offline

#6 2012-12-14 16:10:53

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

Re: Clean url from category link to section

I found that activating this plugin converts txp:section link="1" tags to messy…
(4.4.1 here)

Correction: after creating one rule, the code got back to its usual active positive state.

Last edited by Manaus (2012-12-14 16:41:17)

Offline

Board footer

Powered by FluxBB