# Traditional multi level hierarchy vs flat discourse hierarchy

**URL:** https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809
**Category:** Support
**Created:** [8월 14, 2019, 7:02오후 UTC](https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809 "2019-08-14T19:02:02Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [8월 14, 2019, 7:02오후 UTC](https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809/1 "2019-08-14T19:02:02Z")

</div>

I’m struggling to convince our organisation not falling back to a traditional forum where you can multiple hierarchy levels, which tend to end up in _click-and-run_ torture, see [It’s Time We Talked About Tags](https://blog.discourse.org/2017/10/its-time-we-talked-about-tags/)  
I need ammunition ensuring that it easily feasible by tags without the need to type anything in search box  
It would be great if the following questions get answered.

We have local-nodes supporter network what will grow across the globe comparable with “Local Groups” category on [https://discuss.okfn.org](https://discuss.okfn.org). On there, all location are covered by subcategories. That is the right solution if you don’t go down to city level as we have to do.  
I have in mind a structure as follows:

1. category: local nodes
2. tag: continent (need to be discussed if it makes sense)
3. subcategory: nation (nation shall be well visualized, that is why the continent is tag)
4. tag: city

Is there any possibility, that I can navigate by tags only, making use of tag groups hierarchy, like for

1. tapping from Asia to Japan
  1. Continents  
 ![image](https://global.discourse-cdn.com/meta/original/3X/4/5/45c60ee70a0defe4494447432d3c417c62d467a8.png)
  2. Nations  
 ![image](https://global.discourse-cdn.com/meta/original/3X/1/5/15c8a5e5aedafbd7ce98b855c0da4c7dc904cab7.png)

2. tapping from Europe to Rome
  1. Continents  
 ![image](https://global.discourse-cdn.com/meta/original/3X/4/5/45c60ee70a0defe4494447432d3c417c62d467a8.png)
  2. Nations  
 ![image](https://global.discourse-cdn.com/meta/original/3X/8/a/8a4b081ddd47db14afdbc196534da69f6c34f363.png)
  3. Cities  
 ![image](https://global.discourse-cdn.com/meta/original/3X/d/7/d7c74028eb15907eccfa2451ff8150e826d50e40.png)

I haven’t found a way yet, to cover this by navigations fields bar. Neither have I found a way, that topic is auto-tagged by the name if its subcategory and its subcategory parent category to make this possible work.  
I’m aware of

- [Custom Top Navigation Links](https://meta.discourse.org/t/custom-top-navigation-links/87225)
- [Topic list sidebar navigation](https://meta.discourse.org/t/topic-list-sidebar-navigation/94056)
- [https://meta.discourse.org/t/navigation-add-custom-menu-items/53124](https://meta.discourse.org/t/navigation-add-custom-menu-items/53124)
- [Getting to /tags? - #3 by peternlewis](https://meta.discourse.org/t/getting-to-tags/42922/3)
- [DiscoTOC - automatic table of contents](https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143)
- [Topic auto tagging - #15 by tophee](https://meta.discourse.org/t/topic-auto-tagging/54894/15)
- [How to Organize New User Content? - #11 by John\_Lehmann](https://meta.discourse.org/t/how-to-organize-new-user-content/117386/11)

In addition (for the beginning 🙂)

1. how to make / when does “Search” being shown in tag Search  

2. integrate tag search in category search (I know that there is a search box on the top right but is lists topics too)  

At the end I would like to show a world map in the category “local-nodes”, allowing to zoom into the location of interest.  
I’m hoping I can make use of the map seen on [Locations Plugin 🌍](https://meta.discourse.org/t/locations-plugin/69742/), the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) Plugin [Discourse Data Explorer](https://meta.discourse.org/t/data-explorer-plugin/32566) and [Custom Layouts Plugin](https://meta.discourse.org/t/custom-layouts-plugin/55208), may be integrated into [Discourse Category Banners](https://meta.discourse.org/t/discourse-category-banners/86241).  
currently I’m only aware of:

- single page maps: [Pavilion](https://thepavilion.io/map)
- maps in topics: [👼 The Fairphone Angels Program and Map (Local support by community members) - Local - Fairphone Community Forum](https://forum.fairphone.com/t/the-fairphone-angels-program-local-support-by-community-members/33058)

It shall look somehow like this:

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/b/4b9a8042f2cfbae13b7a562d2e2e349202418eab.jpeg)

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [8월 15, 2019, 12:37오전 UTC](https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809/2 "2019-08-15T00:37:12Z")

</div>

I’ve thought about this a bit. I’ve previously played around with a three-tier category system and different tag-based navigation systems.

> category: local nodes  
> tag: continent (need to be discussed if it makes sense)  
> subcategory: nation (nation shall be well visualized, that is why the continent is tag)  
> tag: city

I think you essentially need a tag dropdown specific to a tag\_group, with the tag\_group being determined by the category context (to accomodate different city groups for nation subcategories).

In terms of having maps in places other than a topic list, or embedded in a post, the Locations Plugin has a componentized map that can be inserted in a category page.

You could achieve both in a theme component. If you need help building such a component I can give you some pointers if you want to try yourself, or you could hire [Pavilion](https://thepavilion.io) to do it for you.

---

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [8월 15, 2019, 10:00오후 UTC](https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809/3 "2019-08-15T22:00:02Z")

</div>

thank you very much for the positive feedback, so anything besides the map could be done by ourselves 😃 but we have to code a bit to customize the theme the way we like.

To get an idea of the roadmap getting this done, can you confirm, correct, extend or answer the following

1. ❓ ensure that we can create endless (only limited by page size) tag dropdowns, with selection on tags based on its previous dropdown.  
@angus, can you confirm that is possible in principle?
2. ❓ can category and tag search merged as asked in 2. in the last (third) list.
3. 🏭 establish a tag hierarchy comparable to what is shown in the OP. This is the very fundamental, without that, this project is doomed.
4. 🏭 introduce auto-tagging
  1. ❓ ▶ 🏭 can this only be done by a plugin as indicated in [Topic auto tagging](https://meta.discourse.org/t/topic-auto-tagging/54894/15)  
➡ see [Tags: category restrictions, tag groups, relationships](https://meta.discourse.org/t/tags-category-restrictions-tag-groups-relationships/48260/26)

5. 🏭 implementing the enhanced [Locations Plugin 🌍 - #429](https://meta.discourse.org/t/locations-plugin/69742/429) 🤩

> [@angus](#):
>
> If you need help building such a component I can give you some pointers if you want to try yourself

if we go down this road I will definitely respond to the generous offer

> [@angus](#):
>
> ou could hire [Pavilion](https://thepavilion.io) to do it for you.

That is currently unlikely as our community is about to make its very first step and revenue will be on a very low level, moreover we are non-profit.

---

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [8월 20, 2019, 1:11오후 UTC](https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809/4 "2019-08-20T13:11:12Z")

</div>

> [@PackElend](#):
>
> ❓ can this only be done by a plugin as indicated in [Topic auto tagging](https://meta.discourse.org/t/topic-auto-tagging/54894/15)

that is answered by [Set up structured tagging with tag groups and category tag restrictions](https://meta.discourse.org/t/tags-category-restrictions-tag-groups-relationships/48260/26)

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [8월 21, 2019, 7:16오전 UTC](https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809/5 "2019-08-21T07:16:01Z")

</div>

Everything is possible in principle.

For example I’ve previously made a 3-level category hierarchy that also supports multiple tag intersections on the category level.

> **3-level category hierarchy with mutli-tag intersections route structure**
>
> ```plaintext
> scope "/multi" do
> constraints(tag_id: /[^\/]+?/, format: /json|rss/) do
> get '/c/:category/t/:tag_id/*tags' => 'tags#show', as: 'tags_category_show'
> get '/c/:parent_category/:category/t/:tag_id/*tags' => 'tags#show', as: 'tags_parent_category_category_show'
> get '/c/:grandparent_category/:parent_category/:category/t/:tag_id/*tags' => 'tags#show', as: 'tags_grandparent_category_category_show'
> 
> Discourse.filters.each do |filter|
> get "/c/:category/t/:tag_id/*tags/l/#{filter}" => "tags#show_#{filter}", as: "tags_category_show_#{filter}"
> get "/c/:parent_category/:category/t/:tag_id/*tags/l/#{filter}" => "tags#show_#{filter}", as: "tags_parent_category_category_show_#{filter}"
> get "/c/:grandparent_category/:parent_category/:category/t/:tag_id/*tags/l/#{filter}" => "tags#show_#{filter}", as: "tags_grandparent_category_category_show_#{filter}"
> end
> end
> end
> 
> ```

This is more complex than what I think you want to do, but it’s not sustainable unless you’re willing to invest a lot of time or resources in supporting it. It would be likely to break at some point when standard Discourse changes.

With that context, there’s two things to understand about the category / tag route structure in standard Discourse:

1. Multi-tag intersections are only possible site-wide; not at the category level, i.e. there aren’t routes in standard Discourse to show a topic list with topics in a specific category and with more than one specific tag. If you wanted this, you’d have to add the route.

2. Category intersections are not possible. i.e. there isn’t a route in Discourse for showing topics from two categories on the same level (i.e. two parent categories or two child categories).

You can still achieve a four-level system (which seems to be your goal) without making significant server-side additions.

For example, you could exclusively use tags to represent the four levels. `https://thepavilion.io/tags/intersection/events/bug/to-do/high` represents the intersection between the tags, events, bug, to-do and high on Pavilion. You could have 4 dropdowns, one for each tag\_group those tags are drawn from, e.g.

[plugin] [type] [status] [importance]

Once you’ve figured out how you want to structure your hierarchy within the existing Discourse route structure, the rest of the things you’ve listed are just client-side modifications and are (relatively) straighforward.

---

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [8월 21, 2019, 8:51오후 UTC](https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809/6 "2019-08-21T20:51:50Z")

</div>

1. 3-level category hierarchy

2. Multi-tag intersections sound good although they

3. only tags

4. merge boxes  
Last but not least, it might be helpful, can you merge boxes like:

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [8월 21, 2019, 11:10오후 UTC](https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809/7 "2019-08-21T23:10:53Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/d/b/dba11ddbfbbffc13eaddd20d6719cfb359bd6060.png)

This won’t work because it violates one of the restrictions I mentioned.

> [@angus](#):
>
> Multi-tag intersections are only possible site-wide; not at the category level, i.e. there aren’t routes in standard Discourse to show a topic list with topics in a specific category and with more than one specific tag. If you wanted this, you’d have to add the route.

You can’t filter by two tags within a category.

![image](https://global.discourse-cdn.com/meta/original/3X/5/2/52967ac93a8789f14592262597b2e4751611be47.png)

I’m not sure, but I think you’re assuming that if you’re in the local nodes category and filtering by ‘continents’, you’ll also be able to filter by nations and cities at the same time. This also won’t work.

> [@PackElend](#):
>
> In the beginning, we properly use only _local nodes_ as category and a subcategory per city\*.\* As soon as there are too many nodes we would switch to _local nodes_ and _nations_ ,

I think that this is your best move

> use only _local nodes_ as category and a subcategory per city

I think you’re trying to incorporate too much future planning into your current needs.

> As soon as there are too many nodes we would switch to _local nodes_ and _nations_

I understand the desire to want to set up the right ‘structure’ now, but however good your service is, it’s going to take a while before this becomes a problem for you, i.e. years. At that stage, the assumptions on which you’re running your community will have changed.

Moreover, the problem you’ll face will be largely one of organisation, rather than one of hierarchy. For example, you could just group the city sub-categories in a modified navigation bar according to nation if you wanted to. If you wanted to have discussion on a ‘national’ level (query whether that would make sense anyway), you could just have a seperate sub-category for that.

You don’t necessarily need a hierarchical structure in your discussion forum that strictly matches the administrative hierarchy of the places around which discussion is happening. You need a hierarchy that makes it possible for your users to find the content that’s relevant to them. I understand you’re connecting those two concepts, but I’m not sure whether that’s warranted. Focusing too much on that connection is over-complicating your thinking around the forum structure.

Basically, I think you’re investing too much in making this structurally similar to how you see the ideal state of your service from a 10,000 foot view, i.e. operating on such a large scale that it’s necessary to divide cities up by nations and continents. When and if you get to that point, the whole nature of this decision will be different.

---

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [8월 22, 2019, 3:40오후 UTC](https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809/8 "2019-08-22T15:40:04Z")

</div>

> [@angus](#):
>
> This won’t work because it violates one of the restrictions I mentioned.
> 
> ![](https://global.discourse-cdn.com/meta/original/3X/7/4/74b7fe99b58de0bd9d1cc542b813425e43f16fa8.png) angus:

you are right my mistake, I got lost in details last night.

> [@angus](#):
>
> I’m not sure, but I think you’re assuming that if you’re in the local nodes category and filtering by ‘continents’, you’ll also be able to filter by nations and cities at the same time. This also won’t work.
> 
> ![](https://global.discourse-cdn.com/meta/original/3X/1/e/1e49e21d078d5dbd3f79e219264eb58e3db3c788.png) PackElend:

[1] Isn’t it possible to add additional drop-down boxes ?  
That would somehow simulate `advanced search`

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/4/148fc554168c5846ae28ac37b6ed7040c3dcdd1a.png)

> [@angus](#):
>
> it’s going to take a while before this becomes a problem for you, i.e. years.

agree. I’m trying to bring together _old_, deep structured thinking with the approach of discourse.

> [@angus](#):
>
> At that stage, the assumptions on which you’re running your community will have changed.

but still, as you said

> [@angus](#):
>
> You need a hierarchy that makes it possible for your users to find the content that’s relevant to them.

not sure if there will be only

> [@angus](#):
>
> discussion on a ‘national’ level (query whether that would make sense anyway)

as there is a focus on projects on very low, geographical limited, area.  
Of course, certain topics will have national or global significance. How to moderate that/put all in the right context/make it available in the right corner of discourse is properly something where learning by doing applies.

If we decide to rely on tags only, your `tag intersection` approach could help tremendously.  
Before we do that step, we need to customize the `tags` and `intersection` landing page to look somehow the same as the `categories` landing page, is that feasible?  
I think of making the layout of [https://se23.life/tags](https://se23.life/tags) to use boxes filled with “sub-tags” as implied in [Higher level of granularity for category & subcategory styling - #7 by PackElend](https://meta.discourse.org/t/higher-level-of-granularity-for-category-subcategory-styling/57071/7) (but there I ask to improve boxes for subcategories).  
In addition, as soon as you click on box or tag within a box, it triggers the query `https://thepavilion.io/tags/intersection/tag1/tag2/tag3/...`. The result is rendered to displayed in the same fashion as the box style (or whatever we consider as appropriated).

As you see I’m still caught in the multi-level route as it is the same analogy, when you zoom in from global to local scale. That is for any new user the most natural navigation route to get to his local node.  
I hope you are proved correct by

> [@angus](#):
>
> You don’t necessarily need a hierarchical structure in your discussion forum that strictly matches the administrative hierarchy of the places around which discussion is happening.

but there might be concerns that a level becomes bloated by too many tags. For example, having all cities of the USA or China in the subcategories China and USA, respectively can get messy.

> [@angus](#):
>
> You need a hierarchy that makes it possible for your users to find the content that’s relevant to them.

agree but although I’m properly

> [@angus](#):
>
> investing too much in making this structurally similar to how you see the ideal state of your service from a 10,000 foot view

😁. That statement will help to de-emotionalise the deep level approach.

> [@angus](#):
>
> Moreover, the problem you’ll face will be largely one of organisation, rather than one of hierarchy. For example, you could just group the city sub-categories in a modified navigation bar according to nation if you wanted to.

can you explain it in more detail or is there an example around?  
Is this navigation bar customization somehow the same as asked in very beginning of this post, marked by [1]

I created kind of mockups visualizing a possible roadmap, postulating that level nation and cities cannot live side by side by making each of them a subcategory of local nodes.

1. Landing page is categories  

2. Landing page is categories but local nodes spring up like mushrooms  

3. lading page tags, custom theme takes care of categories like layout

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [1월 6, 2023, 9:12오후 UTC](https://meta.discourse.org/t/traditional-multi-level-hierarchy-vs-flat-discourse-hierarchy/125809/35 "2023-01-06T21:12:17Z")

</div>


