그룹 사이드바 메뉴 섹션 - 사용 중단됨

:warning: 이 테마 컴포넌트는 Discourse Group Sidebar Menus로 대체되어 비활성화되었습니다. 해당 컴포넌트로 전환해 주세요. 더 안전하고 설정이 쉽습니다. 이 저장소는 더 이상 유지 관리되지 않으며 2026년 2월 28일경 아카이브 처리될 예정입니다.

:information_source: 요약 특정 그룹을 위한 사용자 정의 내비게이션 메뉴 섹션을 표시합니다
:hammer_and_wrench: 저장소 https://github.com/Lillinator/group-menu-sections
:question: 설치 가이드 테마 또는 테마 컴포넌트 설치 방법
:open_book: Discourse 테마 초보자? Discourse 테마 사용 입문가이드

이 테마 컴포넌트 설치

이 테마 컴포넌트는 Discourse 사용자 정의 내비게이션(사이드바) 메뉴 섹션을 특정 사용자 그룹(신뢰 수준 및 기본 그룹 포함)에게만 표시할 수 있게 해줍니다. 이 컴포넌트는 최대 8개의 사용자 정의 메뉴 섹션을 사용할 수 있으며, 각 지정된 섹션에 대해 원하는 만큼의 그룹을 지정할 수 있습니다. 대시(-)로 구분된 소문자 메뉴 섹션 이름을 사용해야 합니다(예: “Superuser Menu” = superuser-menu, “Staff Menu” = staff-menu). 그룹은 드롭다운 선택 필드를 통해 사용 가능한 그룹 중에서 선택합니다.

이 컴포넌트에서 지정된 사용자 정의 섹션은 공개적으로 설정되어 모든 사람에게 표시되도록 구성해야 한다는 점에 유의하세요. 새로운 그룹 내비게이션 메뉴 섹션을 만들려면 평소처럼 공개 섹션을 만든 후, 이 컴포넌트의 설정에서 표시하려는 그룹과 함께 포함시키면 됩니다. 사용자 정의 섹션을 설정하기 전에 컴포넌트 설정에서 섹션을 지정할 수 있으며, 올바른 섹션 이름만 사용한다면 컴포넌트로 제한하기 전에 모든 사람에게 섹션이 표시되지 않도록 방지할 수 있습니다.

이 컴포넌트는 사용자 정의 섹션을 위해 의도되었지만, 내비게이션 메뉴의 기존 섹션(예: 카테고리, 태그, 채널, 개인 채팅, 그리고 이제 비활성화된 “community” 상단 섹션)에도 사용할 수 있습니다. 예를 들어 슈퍼유저 및 스태프 그룹에게 사용자 정의 메뉴를 표시하는 동시에 새 사용자 그룹(trust_level_0)에서 태그와 채널을 숨길 수 있습니다. 특정 메뉴 섹션을 포럼 멤버에게만 표시하고(익명 사용자에게 숨김) 싶다면 trust_level_0 그룹에 표시하도록 설정할 수 있습니다.

:arrow_right: 이 컴포넌트에 사용하려는 모든 그룹의 경우, 그룹 상호작용 설정에서 그룹 가시성이 "Everyone"으로 설정되어 있어야 합니다.


설정:

설정 목록
이름 설명
menu 1 아래 설정의 그룹(들)에게 표시할 사용자 정의 메뉴 섹션 1. 소문자 슬러그 이름을 사용하세요.
display menu 1 for these groups only 메뉴 1에 사용할 사용 가능한 그룹의 드롭다운 선택기. 그룹 상호작용 설정에서 그룹 가시성이 Everyone으로 설정되어 있어야 합니다.
menu 2 - 8 각 그룹 설정의 그룹(들)에게 표시할 사용자 정의 메뉴 섹션입니다.
display menu 2 - 8 for these groups only 메뉴 2 - 8에 사용할 사용 가능한 그룹의 드롭다운 선택기입니다.
hide custom menus globe icon 스태프를 위한 지구본 아이콘을 숨깁니다(비스태프에는 적용되지 않음)

스크린샷:

필요한 그룹 가시성 설정

그룹 선택기가 있는 첫 번째 설정을 보여주는 스크린샷

지구본 숨김 설정


이 컴포넌트는 일반적으로 사이드바 모드에서 내비게이션 메뉴를 위해 의도되었지만, 현재로서는 헤더 드롭다운에서도 작동합니다. 데스크톱 및 모바일 뷰 모두에서 작동합니다.

27개의 좋아요

Wow, I really needed this,Very uselfull, thank you so much. I love your work and your components for discourse.

2개의 좋아요

thank you Tiago! :blush:

3개의 좋아요

Hi, thanks for sharing!

Can this component be used for add a custom link only visible to specific groups on top default section?

no this component is for sections only, not links. you can make a custom section with one link in it though.

1개의 좋아요

I may add this feature at some point I think. If you really want this I can make a specific component for you or show you how to do it.

4개의 좋아요

How would I do the opposite, only show a section to Anon users? I want to create separate sections for Anon users and Forum members (logged in users).

Oh good question. This is how I would do it:

Step 1:

Create a new custom navigation menu section, called say “Anon Menu” (you can call it whatever you want, but remember the name) and make it a public section (check box at bottom of the modal).

Step 2:

Then in the Common-CSS of a theme or theme component that you create, insert this CSS code. Replace “anon-menu” with the section name-slug of the menu section name you created in step 1 (ie: Custom Section = custom-section).

.sidebar-section-wrapper.sidebar-section[data-section-name="anon-menu"] {
        display: none;
}

.anon .sidebar-section-wrapper.sidebar-section[data-section-name="anon-menu"] {
        display: block;
}
1개의 좋아요

In fact, I like this idea as a use case scenario and will add it to the component when I update it next. I’m building a JSON schema modal for the component’s settings so it’s a bit more intuitive to configure.

2개의 좋아요

Thanks. This is more complex than I expected simply from a maintenance perspective I wouldn’t remember what I had done a few months down the line.

EDIT: My attempt to create an anonymous users group does NOT work because that’s only for the Anonymous feature, i.e. when a logged in user changes to Anonymous mode after logging in and not for truly anonymous users (users who don’t have an account).

Oh my apologies I misunderstood you - I didn’t realize you were referring to anonymous mode, I thought you meant not-logged-in users. :woman_facepalming:t2:

Another suggestion, it would be great if it can read the list of groups and offer a dropdown to select from a list of available groups so one doesn’t have typo’s while writing the name of groups

1개의 좋아요

Yes that’s correct, I’m referring to not-logged-in-users, people who land the website and haven’t logged in or don’t have an account.

I tried something above but it didn’t work because that’s a completely different feature (it caused more confusion that it should and I’m sorry about that).

If you use my method above it should work. without using that other anonymous mode feature :slight_smile:

But I will add some options specifically for anonymous users next time I update this component, which should be soon.

1개의 좋아요

I will wait for your theme update, not comfortable customizing themes manually and it becomes a maintenance nightmare for the “uninitiated” :slight_smile:

Just posting a link to my other reply and solution here for anyone else who might read your question here.

https://github.com/Lillinator/anon-menu

I will add this to feature to an upcoming navigation menu modifier component update.

2개의 좋아요

I have updated this component with group drop-down selection boxes that populate with available groups. Also increased the number of menu sections to eight and added a globe icon hider.

2개의 좋아요

Greetings!
I just installed this awesome theme component :ballot_box_with_check:

While setting up I had a question:

  1. In the instructions above, you gave an example of the name of the menu section, such as Sectionname Menu=sectionname-menu

image


In my case, the name of the menu section is written in Russian, for example, “Сотрудники” (English: Staff).


How should I write this section name in the menu 1 line? Russian letters or Latin?
Maybe so:

image

or so

image

Is the word “menu” a required attribute in the text? :sweat_smile:

I’ve tried all the methods, but still nothing works.

I made all groups public, as you prescribed in the instructions.

  1. It seems like I can’t set the visibility of the “Community” section for certain groups using this theme component?
1개의 좋아요

Oh no it’s not, I just had that as part of the example menu name. For example, if the menu name is “User Info” then it would be “user-info”. The best way to do it is when you create the menu section, use the name in the Section title field and convert it to slug format with lowercase and dashes for spaces.

Then in the theme component settings, have this:

Russian I think? Whatever is in the Section title field I marked with an arrow in the first screenshot but with lowercase and dashes for spaces.

I just tested that configuration in my screenshot and it works.

Did you rename the community section in russian at any point? if not then using “community” should work (I’m assuming you mean the top unnamed default menu section).

2개의 좋아요

If I write the section name in Latin letters, then everything works fine:


**
**

And if I write the section name in Cyrillic (Russian), it doesn’t work.