네비게이션 메뉴 표시 제어(Navigation Menu Display Control) 테마 컴포넌트는 직원 전용 및/또는 로그인 사용자 전용으로 다양한 기본 섹션과 링크를 표시할 수 있게 해줍니다. 또한 사용자 지정 섹션이나 사용자 지정 링크(플레이스홀더 이름 포함)를 지정할 수도 있습니다. 익명 사용자 전용으로 사용자 지정 메뉴 섹션을 표시하는 설정과 기본 섹션(카테고리, 태그, 채팅, 채널, 메시지)의 순서를 설정하는 옵션도 있습니다. 설정 내의 섹션과 링크는 기존 섹션으로 편집할 수 있는 목록이며(아래 스크린샷 참조), 원하는 만큼의 사용자 지정 섹션이나 링크를 추가할 수 있습니다.
설정
사용자 지정 메뉴 섹션의 경우, 설정 시 전역적으로 표시 가능해야 합니다(이 섹션을 공개하여 모든 사람이 볼 수 있게 만들기 체크박스가 활성화되어 있어야 함).
상단 섹션은 코드에서 "community"라고 불리므로, 이 섹션을 숨기려면 “community” 섹션 이름을 사용하세요. 플러그인으로 설치된 링크(예: 문서, 기념일, 생일 링크)를 사용할 수 있습니다.
서로 오버라이드되는 설정도 있습니다 - 로그인 사용자에게 '더 보기(More)'에 특정 링크가 표시되도록 설정하더라도, ‘더 보기’ 드롭다운 설정이 직원 전용으로 표시되도록 설정되어 있으면 해당 설정이 우선 적용됩니다.
설정 이름
설명
show these sections for staff only
직원만 표시할 섹션 목록. “Staff Menu = staff-menu” 슬러그 스타일 명명 형식으로 사용자 지정 섹션을 포함할 수 있습니다.
show these sections for logged-in only
로그인 사용자만 표시할 섹션 목록. “User Menu = user-menu” 슬러그 스타일 명명 형식으로 사용자 지정 섹션을 포함할 수 있습니다.
show these links for staff only
직원만 표시할 링크 목록. 대소문자 형식이 동일해야 하는 사용자 지정 링크 이름을 포함할 수 있습니다 (“Staff Link” = “Staff Link”).
show these links for logged-in only
로그인 사용자만 표시할 링크 목록. 대소문자 형식이 동일해야 하는 사용자 지정 링크 이름을 포함할 수 있습니다 (“User Link” = “User Link”)
show more for staff only
직원만 ‘더 보기’ 드롭다운 섹션을 표시하도록 하는 체크박스.
show more for logged-in only
로그인 사용자만 ‘더 보기’ 드롭다운 섹션을 표시하도록 하는 체크박스.
show custom for anon only
익명 사용자만 표시할 사용자 지정 메뉴 섹션을 위한 텍스트 필드(로그인 사용자에게는 숨김).
show navigation menu to logged-in only
전체 네비게이션 사이드바 메뉴를 로그인 사용자만 표시하도록 하는 체크박스(익명 사용자에게 숨김).
hide custom menus globe icon
직원용 사용자 지정 메뉴 섹션에서 지구본 아이콘을 숨김(기본적으로 비직원에게는 표시되지 않음).
I don’t think the hiding links thing is quite working correctly at the mo.
Sections hide just fine for me, but I can’t hide individual custom links when I convert them to lowercase and dashes.
But the official links seem to need lowercase. So they might be handled differently.
However - they work if the full title text is used (with spaces and capitals). So maybe only the OP (can it be wikified?) and the instructions in the TC need to be changed. Or maybe a core change is needed for consistency.
Ok the component is still functioning properly, but the custom link class name format has changed so I had to make some changes to the field documentation in the component and the OP. Please update the theme component.
Unlike the custom menu sections, for the custom links, the names in the component settings should be the same case format as their actual custom names. Of course the default ones should still be lowercase just to make things even more confusing lol.
For example, if I want to show a specific custom link called “GitHub Repo” for logged in users only:
So if you have custom links in the links display settings - show these links for staff only and show these links for logged-in only - you will need to change those component settings entries to match the link names.
Note that for custom menu sections (not links), the naming convention is still the same as it was before - it is still lower case slug style (ie: “Custom Menu Name” = custom-menu-name).
Thanks again for bringing this to my attention @nathank
At some point I want to add the ability rearrange all the navigation sidebar menu sections, including custom ones, not just the default ones as it does currently. I know how to do it in hardcode, I just have to build it in to use settings and variables.
You can’t re-order custom sections with this component. I just checked the reorder functionality and it is working as expected.
Yea I can confirm the anon-hiding function is borked. I will fix it today. thanks for letting me know.
after looking ati it, the anon hiding function is working as expected, but you have to remove the default examples that I use in the settings for the show these sections for logged-in only to demonstrate how it works.
Im stuck, while trying to comprehend how to use this nice component. Im trying to achieve that anon users only see “Become a member” or something similar.
Can you please help me?
If you just want to add a link in the top section under My Posts, you can add the link to /login via the More - Customized this section link like this. For example if the link is called “Login or Signup”: