Topic on Extension talk:CategoryTree

How to define the tree node? ( Rookie stupid problem )

17
Summary by Alexandroslee

Thanks a lot, I got it!

Alexandroslee (talkcontribs)

Hi,

I don't know how to define the tree node?

I had install Extension:CategoryTree https://www.mediawiki.org/wiki/Extension:CategoryTree

and had activated

but I don's know how to define the tree node ?

such as

<categorytree mode="pages">abc</categorytree>

<categorytree mode="pages">def</categorytree>

means I would create a page abc this a tree node

and I

<categorytree mode="categories">xyz</categorytree> this is parent node?

<categorytree mode="pages">abc</categorytree>

<categorytree mode="pages">def</categorytree>

Please help me

this is a Rookie stupid problem

-- Alexandroslee (talk) 07:41, 14 August 2018 (UTC)

Alexandroslee (talkcontribs)

copy the code and I creat a category Manual

<categorytree mode="Category" style="float:right; clear:right; margin-left:1ex; border:1px solid gray; padding:0.7ex; background-color:white;">Manual</categorytree>

but won't work?!

Alexandroslee (talkcontribs)

I had create a Category:Manual

the content like this

[[category:AAA]]
[[category:BBB]]
[[category:CCC]]

BUT WON'T WORK

Tacsipacsi (talkcontribs)

Could you please share more details? What does “not working” mean? There is no output? You get some error message? The raw wikitext is displayed? Something else? Have you verified that the extension is installed (i.e. it shows up on Special:Version)? Can you share an exact URL where the problem occurs (if the wiki is public)?

Alexandroslee (talkcontribs)

I am useing version 1.26.3

I had successfully use to show the tree,

But how could I use the "custom tag " ?

Alexandroslee (talkcontribs)

Would you mind providing some examples for

The {{#categorytree}} parser function and

The Special:CategoryTree page for me?

I try to control the sequence of the tree items

Alexandroslee (talkcontribs)

and I can't hide the prefix

<categorytree mode="all" hideprefix="always">Job:jobcategory</categorytree>

but won't work !

please help!

Alexandroslee (talkcontribs)

now I use the wiki category , and I try the namespace ( such as "Job:FEE" )

and I wish I could hide the Job (prefix ? ) only left "FEE"

how should I do?

Alexandroslee (talkcontribs)

I am useing zh-tw and the syntax seem change to traditional Chinese

it make me very Confuse

suck as the category been to "分類" so I have to add the category like 分類:jobcategory

but when I try to create the namespace like "jobs" and the category like 分類:jobs:jobcategory

and when I setup the category tree like

<categorytree mode="all" hideprefix="always">Job:jobcategory</categorytree>

but the prefix "jobs" still show at each item !

I am frustrated , please help, Tanks a lot!

Alexandroslee (talkcontribs)

I try the Category:Manual

and the sub is Manual:Contents

that meas the namespace is a Category

so I have to set a Category such as "jobs"

then I create jobs:FEE and jobs:BED and jobs:FED

the put the

in each page jobs:FEE and jobs:BED and jobs:FED

then how can I use the category tree and hide the prefix "jobs"

that is my question

Alexandroslee (talkcontribs)

I use the mode="all' and expected the pages is show off

but only categoris show !

what's worng I made?

Alexandroslee (talkcontribs)

so I would like to know

how to

as a "custom tag" (or "parser function") to show a category structure in-line on a wiki page,

or

and as a special page.

Is there some examples ?

Tacsipacsi (talkcontribs)

Your messages are a bit messy for me, I answer what I understand:

  • Items are ordered by type (category, page, file, in this order), and by sort key within each type. This behavior cannot be changed, but the sort keys can be, of course.
  • hideprefix hides namespace prefix. For Category:Jobs:Jobcategory it’s Category:. For Jobs:Jobcategory it may be Jobs: if it’s a real namespace registered in MediaWiki, or nothing otherwise. Pages can’t have more than one namespace, so a category’s namespace will always be Category.
  • mode=all should show all pages in the category, i.e. the ones that show up in the category listing (not the ones that are manually linked from the category page). If it’s not the case, you’ve found a bug.
  • <categorytree> is a custom tag which shows a category structure on a wiki page, and Special:CategoryTree is a special page. Why aren’t they good?
Alexandroslee (talkcontribs)

Thank you very much ! I had show the category tree now, but only the order

how about the " sort keys " you mention ?

Alexandroslee (talkcontribs)

Thanks , now I got the meaning of Special:CategoryTree is a special page,

cause I think maybe I could edit the special page to defind the items and order

Tacsipacsi (talkcontribs)
Alexandroslee (talkcontribs)

Thanks a lot, I got it and done!