Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-11-13 19:56:45

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Category links

I’m creating links to categories with the following code:-

<a rel="bookmark" href="<txp:site_url />portfolio?c=<txp:image_info type="category" />"><txp:image_info type="category_title" /></a>

The URLs produced look fine to me but I am getting a 404. This wasn’t a problem before updating the site to 4.5.2 so has anything changed for category URL structure?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#2 2012-11-14 06:39:27

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,340
Website GitHub Mastodon

Re: Category links

Textpattern 4.5 is more strict with regard to existing categories than previous versions. It also strictly assumes an ‘article’ context unless told otherwise while we had a few bugs in asserting this assumption in 4.4.x.

Please verify:

  • Does the category really exist?
  • Is it an ‘article’ category?

Otherwise Textpattern will throw a 404 response unless you explicitly specify a context (e.g. <a rel="bookmark" href="<txp:site_url />portfolio?c=<txp:image_info type="category" />&amp;context=image"><txp:image_info type="category_title" /></a> for an ‘image’ context).

Last edited by wet (2012-11-14 09:03:40)

Offline

#3 2012-11-14 07:43:07

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Category links

Ahh! Context, context, context. Why did I not know about this?

Thank you Robert. That fixed the problem. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB