Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-04 16:29:08

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

4.0.3 r1188: txp:category no output issue

I don’t know if this is a bug or a feature request so here goes.

If I am in a category (e.g. /issues/?c=biotech-and-food) and I have txp:category in my page template to output what category I am in txp:category doesn’t output the current category if there is no article associated with that category. Should it output the current category regardless if you have articles associated with it or not?

  • If I have a list of links in the category “biotech-and-food” but no articles, txp:category outputs nothing.
  • If I have a list of links and articles in the category “biotechnology” the txp:category outputs the current category.

Example with article and without article.

Notice the missing category above the linklist in Biotech and Food.

Any thoughts?

Diagnostics:

Textpattern version: 4.0.3 (r1188)
last_update: 2006-01-04 15:25:49/2006-01-04 15:22:40
Document root: path obscured
$path_to_site: path obscured
Textpattern path: path obscured/textpattern
Permanent link mode: section_title
Temp folder: /tmp
Site URL: eteam.ncpa.org
PHP version: 4.3.11
server_time: 2006-01-04 10:13:02
MySQL: 4.1.11-standard-log
Locale: English_United States.1252
Server: Apache/1.3.27 (Unix) PHP/4.3.11 mod_perl/1.27 mod_jk/1.2.2
Apache version: Apache/1.3.27 (Unix) PHP/4.3.11 mod_perl/1.27 mod_jk/1.2.2
php_sapi_mode: apache
os_version: Linux 2.4.20-18.7smp

Offline

#2 2006-01-05 05:36:40

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: 4.0.3 r1188: txp:category no output issue

Should it output the current category regardless if you have articles associated with it or not?

Yes. The code for that tag never refers to the article table. Could be an empty category title; or are you mixing up your article and link categories?


Alex

Offline

#3 2006-01-05 16:33:45

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: 4.0.3 r1188: txp:category no output issue

or are you mixing up your article and link categories?

That is it. I am showing article and link categories on the same page. I have an article and link category for biotechnology but for biotech and food I only have a link category and not an article category.

I guess txp:category pulls the current category only if it is an article category. Is this correct?

I have been using upm_category_title which, I guess, pulls the current category from the URL regardless of what type of category it is. I thought since txp:category added the ability to output titles that I would get to remove one more plugin but I guess it is back to using upm_category_title.

Offline

Board footer

Powered by FluxBB