Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-26 04:18:24

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

category_list - changing the 'category' bit in the URL

I’m using category_list to generate links to articles by category, that come out as: www.mysite.com/category/category-name.

Is there any way to change the category bit in the URL or is it hard coded deep within TXPs code.

I don’t want to have ti sue a section to be able to achieve the same thing.

Cheers,

Loz

Last edited by lozmatic (2010-09-26 04:19:14)

Offline

#2 2010-09-26 10:57:35

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

Re: category_list - changing the 'category' bit in the URL

It comes from the language file, hence from your site’s txp_lang table. You could change it there (change the data field for the item with a name of category; leave the name as is), but as with all hacks you would have to duplicate the change on every upgrade. (Edit: Or avoid hacks by following Els’s recommendation, below.)

Last edited by jsoo (2010-09-26 13:11:02)


Code is topiary

Offline

#3 2010-09-26 11:44:16

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: category_list - changing the 'category' bit in the URL

Hi,

I found a few… would it be this one?

category => Category

There is also..

category_subcategory => /category/subcategory

Offline

#4 2010-09-26 12:06:59

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

Re: category_list - changing the 'category' bit in the URL

That doesn’t appear to be in use anywhere. Might be a planned feature for a future release. (Edit: I meant category/subcategory is not currently in use. As Els confirms, 'category' => 'Category' is the one you’re after.)

Last edited by jsoo (2010-09-26 13:10:42)


Code is topiary

Offline

#5 2010-09-26 12:25:09

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

Re: category_list - changing the 'category' bit in the URL

lozmatic wrote:

would it be this one?

category => Category

Yes, that’s it. Have a look at wet_babble.

Offline

#6 2010-09-27 10:11:07

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: category_list - changing the 'category' bit in the URL

Perfect :)

Thanks.

Offline

Board footer

Powered by FluxBB