jame
jame

Reputation: 132

alfresco how to get category name by javascript

First I can get all sub categories by js,but I only get the category name like English etc. I want to get category name like /categories/General/Languages/English/American English in js.Any idea? Thanks!

Upvotes: 0

Views: 946

Answers (2)

jame
jame

Reputation: 132

Through my experiment, I found a better idea, thecategoryNode.displayPath could get name like /categories/General/Software Document Classification/Development Plans directly. Thank you!

Upvotes: 0

Tahir Malik
Tahir Malik

Reputation: 6643

Just use the path and replace the cm: and x0020 with the appropriate characters.

A category is just a node, so when getting the path you'll get the following:

/cm:categoryRoot/cm:generalclassifiable/cm:Languages/cm:English/cm:American_x0020_English

Upvotes: 1

Related Questions