Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Clean category url won't work /category/whatever/
For some reason I can’t display content properly using when I try to go to a clean category url /category/whatever/
I get the following error:
tag_error -> Textpattern Notice: Page template template does not contain a txp:article tag on line 504
textpattern/publish.php:504 trigger_error()
index.php:33 textpattern()
It will work fine if if I use /section/?c=whatever
Maybe I am using a the if_category_conditional wrong. For example, I am using this code to output content if:
1) Front page of a section
2) Category of a section
3) Individual article of a section
<txp:if_category>
<!—category page begin—>
<txp:output_form form=“c_photography_category” />
<!—category page end—>
<txp:else />
<txp:if_individual_article>
<!—individual page begin—>
<txp:output_form form=“c_photography_individual” />
<!—individual page end—>
<txp:else />
<!—front begin—>
<txp:output_form form=“c_photography_front” />
<!—front page end—>
</txp:if_individual_article>
</txp:if_category>
Art Rogue – Fine Art Photography
Offline
#2 2009-07-02 20:10:46
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Clean category url won't work /category/whatever/
Your output_form tags don’t reveal much. Could you please post the content of those forms?
Offline
Re: Clean category url won't work /category/whatever/
Els, didn’t you mention in a previous thread somewhere that the /category/my-category
urls only work at root level and not if the category is additionally called from within a section, i.e. /section/category/my-category
is not possible? I always thought I’d never been able to get /category/my-category
to work, but it’s probably because I always had categories in sections.
TXP Builders – finely-crafted code, design and txp
Online
#4 2009-07-02 20:54:27
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Clean category url won't work /category/whatever/
Aaah (lightbulb goes on)! Thanks Jakob :)
Matt, /category/category-name
URLs use the front page/default section, so if you are using this code on a section page or inside if_section tags, that explains why the ‘clean’ URLs don’t display your content and /section-name/?c=category-name
URLs do.
If you want /section-name/category-name/
, have a look at gbp_permanent_links.
Offline