들여쓰기/중첩 사이드바 카테고리 또는 하위 카테고리

:warning: 이 테마 컴포넌트는 Discourse Indented Subcategories를 대신하여 비추천(deprecated)되었습니다. 훨씬 더 간단하고 사용하기 쉬운 해당 테마로 전환해 주세요. 이 저장소는 더 이상 유지보수되지 않으며 2026년 2월 20일경에 아카이브 처리될 예정입니다.

:information_source: 요약 사이드바에서 선택된 카테고리 또는 하위 카테고리를 들여쓰기/중첩합니다
:hammer_and_wrench: 저장소 https://github.com/Lillinator/discourse-nested-categories
:eyeglasses: 미리보기 Discourse Theme Creator에서 미리보기
:question: 설치 가이드 테마 또는 테마 컴포넌트 설치 방법
:open_book: Discourse 테마를 처음 사용하시나요? Discourse 테마 사용 입문가 가이드

이 테마 컴포넌트 설치

이 간단한 테마 컴포넌트는 두 가지 방식으로 사용할 수 있습니다. 사이드바에서 들여쓰기(또는 중첩)할 카테고리 또는 하위 카테고리를 선택하는 방식이거나, 특정 카테고리 목록을 제외하고 모든 카테고리를 들여쓰기하도록 허용하는 방식입니다. 대부분의 사용자는 중첩된 모양을 보이도록 하위 카테고리만 들여쓰기를 원할 것입니다. 하지만 목록에 있는 카테고리 중 어떤 것이든 들여쓰기할 수 있습니다. 데스크톱 및 모바일 뷰, 그리고 헤더 드롭다운 메뉴에서도 작동합니다. 일부 코드에 도움을 주신 @dax님께 감사드립니다.

설정은 총 3가지가 있으며, 수행하려는 작업에 따라 첫 번째 설정만 사용하거나 두 번째와 세 번째 설정을 함께 사용해야 합니다.

설정 설명
indent only select categories 들여쓰기할 선택된 카테고리 또는 하위 카테고리 목록.
indent all categories except the following 아래 목록 설정에 포함된 카테고리를 제외하고 모든 카테고리를 들여쓰기하려면 이 설정을 활성화하세요. 위의 목록 설정은 비워 두어야 합니다.
categories not to indent 들여쓰기하지 않을 카테고리

사이드바의 설정 및 결과 스크린샷

선택된 카테고리만 들여쓰기

요약

설정:

결과:


지정한 카테고리를 제외하고 모든 카테고리 들여쓰기

설정:

결과:


참고: 위 스크린샷과 같이 비공개 카테고리의 카테고리 항목에서 잠금 아이콘을 숨기고 싶다면 이 컴포넌트를 사용할 수 있습니다.

29개의 좋아요

Yes!!! This is one step towards finally being able to use the sidebar!

3개의 좋아요

Nice work, @Lilly!

It doesn’t quite hit the need of my instance, however. I’ve got a lot of subcategories and only a few categories - and the subcategories are quite dynamic.

It would be better for our instance if all categories+subcats were indented by default and the list was for the categories that shouldn’t be indented.

3개의 좋아요

Hmmm, let me think about this - I see what you mean. Let me tinker with it a bit, but I’ll address your use case either way (with a separate component or a couple of additional settings). I was also thinking of including a setting that allowed for formatting or hiding the subcategory bullets. :thinking:

5개의 좋아요

I have updated the component to allow configuring indented categories the opposite way - that is, indenting all but a select list. I hope this helps your use case. :slight_smile:

6개의 좋아요

This is looking great in our community, thank you for this!

2개의 좋아요

Please update this component. I pushed a minor update to it today to fix an issue where the “All categories” button was also indenting if the indent all categories except the following setting was being used.

4개의 좋아요

Hey Lilly, I’m enjoing using this TC - in both ways!

But I’ve got a dumb question:

Why not simply make this component indent all of subcategories (and no categories) by default?

Great work @Lilly!

Is there any way to adjust this to work with Sub-Sub-Categories as well?

So there would be 2 levels of indenting available.

For example:
We have the category of Learning, with the Sub-Categories (Learning Tools & How To’s), the Sub-Sub-Categories of Games & Best Practices.
(Learning - learning tools - games) & (Learning - How To’s - Best Practices)

It would be great if we could nest games and best practices like this.

2개의 좋아요

Doesn’t that look restless?

1개의 좋아요

Hi @Jagster,
I am not sure what you mean by that. Sorry :frowning:

Eyes will wonder because nothing is in straight lines. Thats why we try keep spacing etc. as much same as possible in texts, toolbars… And at same time icons and colors changes too. The icon of main category has some information value, others no. That doesn’t make navigation easier, but opposite. And all of that is basically the main reasons why deep nesting is an bad idea, no matter if we are talking books or web. Plus you lost precious space and names of categories aren’t names any more.

And if you really has that huge amount of specific topics that you must use several main categories and at least same amount sub-categories, because you have plenty of sub-sub-categories (and all the time mains and first level subs are just headers showing other categories), that will lead to so long sidebar that there is absolut no one who would use it.

Hate to this at loud, but that looks totally same than css snippets where intends are used to show logical structure of { } pairs. It is never ment to reading.

2개의 좋아요

Thank you for elaborating on your thoughts here @Jagster. I truly appreciate your feedback.

You make a lot of great points, especially about not creating an excessively long sidebar and the colors and icons not flowing together.

I do wish that I could expand the nested categories like an accordion, then we could have the best of both worlds, a short sidebar, but also quick navigation through the site.

1개의 좋아요

i’d recommend reading this topic, especially the posts about Wix forum and it’s category simplicity.

Also keep in mind that your users can customize their own category sidebar sections.

Honestly, I don’t see how sub-sub-categories would work here with nesting - it would create a bit of a visual mess I think. Not even sure if it’s possible to build into this component…

6개의 좋아요

I just installed this on my instance and none of my sub-categories are indenting…
At least that’s what I thought. I set it to indent all except chosen, and left the list blank.
I didn’t realize at first that it was indenting everything, including categories.
Is there any way you can update this with a box to simply “indent all sub-categories”? You can add an exclusion list if you want, but in my use case, I always want sub-categories indented and never indent categories.

For your use case, why not simply put the categories in the `Categories not to indent’ box?

I agree, it would be nicer to just indent subcategories. However, at the time @Lilly developed this TC that was quite tricky to achieve. Personally, I find the above solution very workable unless your categories are unusually dynamic.

While I’m here…

Feature Request - expandable / collapsable subcategories

This is discussed here:

I do wonder if it would work as an extension of this Theme Component.

We could potentially have some budget to go towards this if anyone is interested in joining forces.

1개의 좋아요

As an aside, I’ve found the JS I added (I had to add some more modifications to it that I can share) works as a stopgap, in that it’s basically just folding up subcategories when the page loads and allowing the user to expand or visit parents by injecting a chevron. The only problem is that some interactions rewrite the navigation entirely, so the JS has to reapply its classes to keep the subcategories collapsed (interacting with the hamburger at the top, or on mobile for example).

For sure, that’s what I’m doing. I just didn’t ‘get it’ right away.
It’s only a pain right now while I’m building a new site as I keep adding categories and subs. Once development is done things will be pretty much static.

1개의 좋아요

이 테마 구성 요소는 Indented Subcategories 을 권장하며 더 이상 사용되지 않습니다. 해당 구성 요소로 전환해 주세요. 훨씬 더 단순하고 사용하기가 쉽습니다. 이 저장소는 더 이상 유지 관리되지 않으며 한 달 내에 아카이브 처리됩니다.

3개의 좋아요

@Lilly, 감사합니다. OP를 업데이트했습니다.

1개의 좋아요