Est-il possible de créer des sous-sous-catégories ?

Is it possible to create subcategories within subcategories? For example, can I have a grandparent category, parent subcategory, and child subcategory? If not, is there any alternative to creating a separate instance for each “grandparent”?

4 « J'aime »

No, there are only two levels of categories in Discourse.

We’ll combine the 2 levels of categories with tags. It’s not just about taxonomy, it’s also about moderation rights.

Will 3 levels of categorization be possible in the future? My site is about 4 sports, then within each sport, I want a category called “Gear”, and then within “Gear” have the different brands.

I could also do a top level category called Gear, and then have the Gear Companies underneath.

Or just have the Gear companies for each sport listed directly under the sport.

1 « J'aime »

No plans for more than 2 levels of categories. As @jeans noted, adding tags into the mix makes more sense at that point. So use the official tag support built into Discourse.

5 « J'aime »

@codinghorror What would be the technical implications of allowing deeper nesting of categories? I don’t have a specific requirement in mind, just curious. I can see UI concerns, but the data model looks like it could handle chains of parents.

Here a typical case where we need to configure Discourse with 3 levels,
Local Groups - Open Knowledge Forums

the local-groups are in fact the “level zero”, in some cases we also change language (!), as at local-groups/okbr. The main topics are at this level-2, it is ok, but…

The level-3 is important to isolate very distinct topics and/or communities:

  • to isolate official topics. Example: today we use the “official” tag as here, but we need to isolate as local-groups/okbr/oficial,

  • to isolate projects, because they have independent communities and very specific topics. Example: this project was losted in an external category, openspending/gastos-abertos, we need an intersection between openspending and local-groups/okbr and we understand that the second is the priority, so need category local-groups/okbr/prj-gastos-abertos that is a typical “local group project” category.

This is interesting that have you decided that any existing field of knowledge may require to be split by exactly one level of categories but never by level two or higher. While I don’t know your exact reasoning but for me it’s very hard to believe that this can be the truth.

Two levels, not three. And we’re not the only people to think so.

We were very proud of our user interface and the fact that we had a way to browse 16,000 (!!) pages of documentation on a CD-ROM. But browsing the hierarchy felt a little complicated to us. So we asked Tufte to come in and have a look, and were hoping perhaps for a pat on the head or some free advice.

He played with our AnswerBook for about 90 seconds, turned around, and pronounced his review:

“Dr Spock’s Baby Care is a best-selling owner’s manual for the most complicated ‘product’ imaginable – and it only has two levels of headings. You people have 8 levels of hierarchy and I haven’t even stopped counting yet. No wonder you think it’s complicated.”

6 « J'aime »

How can you actually tag a category?

Bonjour, merci pour le formidable outil de discussion et la communauté. Je souhaiterais savoir s’il est possible de créer des sous-catégories dynamiquement ? Comment cela peut-il être fait avec des tags ?

Essayez ceci

1 « J'aime »

Vous pouvez maintenant créer des sous-catégories, il suffit de faire de la catégorie parente la catégorie sous laquelle vous souhaitez avoir la sous-catégorie.

1 « J'aime »

Il est possible de modifier le niveau des sous-catégories via un réglage de site caché :

cd /var/discourse/

./launcher enter app

rails c

SiteSetting.max_category_nesting = 3

7 « J'aime »

Il fait référence aux sous-sous-catégories, c’est-à-dire un 3e niveau, et non à un 2e niveau (sous-catégories).

2 « J'aime »

Bien. Et ce paramètre caché permet d’avoir des sous-sous-catégories (trois niveaux, d’où le 3 dans le paramètre). Il existe depuis un an, je pense, mais il n’a pas reçu beaucoup de publicité lors de son ajout (il était juste dans les notes de version, mais n’a peut-être pas eu de titre). Je suppose qu’un client d’entreprise a dû vouloir la fonctionnalité, mais ils pensent toujours que c’est une mauvaise idée. :wink:

5 « J'aime »

Je n’ai jamais essayé de créer une sous-sous-catégorie, est-ce impossible via l’interface utilisateur ?

C’est possible une fois que la fonctionnalité est activée. Vous définissez le parent sur la sous-catégorie au lieu de la catégorie parente pour créer une sous-sous.

Voici à quoi ressemble l’écran de création d’une catégorie lors de la création d’une sous-sous :

Je ne me souviens plus qui l’a demandé à l’origine, mais nous avons demandé à l’activer il y a un peu plus d’un an sur les forums NaNoWriMo dans l’espoir que cela aiderait éventuellement à résoudre un problème beaucoup plus vaste et quelque peu unique que nous avons.

Cela a résolu notre problème de cas de test, mais malheureusement, rien de moins qu’un miracle ne pourrait jamais résoudre l’autre problème. :slight_smile:

3 « J'aime »