Loading...
 
Features / Usability

Features / Usability


Problems with CATEGORY

posts: 3665 United States

Having a problem/question with the CATEGORY plugin

I have a category/subcategory FOO::BAR
And I have a wiki page that is categorized as BAR

On a wiki page, I've added:
CATEGORY(id=>XX,sort=>name_asc,sub=>false)

Where XX is the category for FOO. I expect to see items that are categorized as FOO, but my wiki pages that are categorized as BAR are also being included.

What have I done wrong?

-Rick

posts: 3665 United States

Does the sub=>false work for anyone? I'm using 1.9.4....



> Having a problem/question with the CATEGORY plugin
>
> I have a category/subcategory FOO::BAR
> And I have a wiki page that is categorized as BAR
>
> On a wiki page, I've added:
> CATEGORY(id=>XX,sort=>name_asc,sub=>false)
>
> Where XX is the category for FOO. I expect to see items that are categorized as FOO, but my wiki pages that are categorized as BAR are also being included.
>
> What have I done wrong?
>
> -Rick


posts: 80 Austria

Hi!

Try
Copy to clipboard
sub => n

This works.

There seems to be an inconsistency in the documentation.
lib/wiki-plugins/wikiplugin_category.php

Here the plugin asks for y|n and translates it to true|false
Copy to clipboard
if (isset($sub) and substr(strtolower($sub),0,1) == 'n') { $sub = false; } else { $sub = true; }
because categlib needs it as true|false
Copy to clipboard
$categlib->get_categoryobjects($catids,$types,$sort,$split,$sub,$and)


Torpedro


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting