이 테마 컴포넌트는 Discourse Indented Subcategories를 대신하여 비추천(deprecated)되었습니다. 훨씬 더 간단하고 사용하기 쉬운 해당 테마로 전환해 주세요. 이 저장소는 더 이상 유지보수되지 않으며 2026년 2월 20일경에 아카이브 처리될 예정입니다.
이 간단한 테마 컴포넌트는 두 가지 방식으로 사용할 수 있습니다. 사이드바에서 들여쓰기(또는 중첩)할 카테고리 또는 하위 카테고리를 선택하는 방식이거나, 특정 카테고리 목록을 제외하고 모든 카테고리를 들여쓰기하도록 허용하는 방식입니다. 대부분의 사용자는 중첩된 모양을 보이도록 하위 카테고리만 들여쓰기를 원할 것입니다. 하지만 목록에 있는 카테고리 중 어떤 것이든 들여쓰기할 수 있습니다. 데스크톱 및 모바일 뷰, 그리고 헤더 드롭다운 메뉴에서도 작동합니다. 일부 코드에 도움을 주신 @dax님께 감사드립니다.
설정은 총 3가지가 있으며, 수행하려는 작업에 따라 첫 번째 설정만 사용하거나 두 번째와 세 번째 설정을 함께 사용해야 합니다.
설정
설명
indent only select categories
들여쓰기할 선택된 카테고리 또는 하위 카테고리 목록.
indent all categories except the following
아래 목록 설정에 포함된 카테고리를 제외하고 모든 카테고리를 들여쓰기하려면 이 설정을 활성화하세요. 위의 목록 설정은 비워 두어야 합니다.
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.
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.
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.
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.
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)
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.
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.
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…
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.
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.