카테고리 그룹

:discourse2: 요약 카테고리 그룹은 카테고리를 그룹에 할당할 수 있으며, 이 그룹은 카테고리 페이지에서 카테고리를 정렬하고 접는 데 사용됩니다.
:eyeglasses: 미리보기 Discourse Theme Creator에서 미리보기
:hammer_and_wrench: 리포지토리 링크 https://github.com/discourse/discourse-category-groups-component
:open_book: Discourse 테마를 처음 사용하시나요? Discourse 테마 사용 입문가이드

이 테마 컴포넌트 설치

기능

:information_source: 참고할 중요한 사항:

  • 이 테마 컴포넌트는 사이트 설정 desktop category page styleboxes with subcategories로 설정되어 있을 때만 작동합니다(해당 카테고리 페이지 템플릿을 대체하기 때문).

  • 카테고리 접기는 브라우저의 로컬 스토리지를 사용하므로, 접힌 상태는 다른 기기 간에 기억되지 않습니다.

설정

이름 설명
category groups 그룹이 구성되는 방식입니다. 형식: 그룹 이름: category-slug, extra-link-id, category-slug-2 (카테고리 슬러그는 URL에서 확인되는 카테고리의 이름입니다. 일반적으로 공백 없이 모두 소문자입니다)
extra links 카테고리 목록에 섞어 넣을 수 있는 추가 링크입니다. 렌더링하려면 category_groups 설정에 링크 ID를 추가하세요
show on mobile 모바일에서 접을 수 있는 카테고리 박스 그룹 표시
show ungrouped 다른 그룹에 할당되지 않은 카테고리의 그룹을 표시
fancy styling 추가 스타일링 켜기 (일부 사용자 정의 스타일이 추가되었습니다. 기본값에서 벗어나므로, 자체 테마를 작업 중이라면 이 기능을 비활성화하는 것이 좋습니다)
hide muted subcategories 활성화되면, 음소거된 하위 카테고리가 있는 경우 음소거되지 않은 상위 카테고리가 음소거 섹션에 표시되지 않습니다
테마 번역 기본값
ungrouped_categories_title 기타

:discourse2: 저희가 호스팅을 제공하나요? 테마 컴포넌트는 Pro, Business 및 Enterprise 플랜에서 사용할 수 있습니다.

53개의 좋아요

I’ve just merged a refactor of this component. Functionality should remain the same overall, with some bug fixes.

https://github.com/discourse/discourse-category-groups-component/pull/11

Behind the scenes this uses some modernized Ember, and eliminates template overrides, which can be a little fragile as far as Discourse customizations go.

This should be fixed now

This is fixed now, the groups will no longer apply to the subcategory layouts

I’ve updated this, so category logos should be much more normally sized now

6개의 좋아요

Is it possible to not show subcategories for a particular category? We have a category that’s organized in a particular way with nested subcategories and it’s causing the box to be quite large.

2개의 좋아요

아마도 #customization:theme-component에서 Category Hider를 시도해 볼 수 있습니다.

2개의 좋아요

Can you tell me if it’s possible to apply the category groupings to the sidebar? If not, I would like to put this in as a feature request. Thanks!

1개의 좋아요


There is a problem on my website, subcategories hasn’t space between them.

2개의 좋아요

Thanks for reporting it, an update should fix it now (fixed in UX: include gap for subcategories by awesomerobot · Pull Request #19 · discourse/discourse-category-groups-component · GitHub).

2개의 좋아요

It’s not possible, the sidebar would need a bigger change in Discourse to allow for this (request noted!)

2개의 좋아요

Will be awesome if this grouping will be customizable by user, some people in our community wanted that.

Yeah, this needs a plugin, but a good idea I think

Any idea why the category width is so skinny? Is there a way to fix this?

2개의 좋아요

is this in the Mint theme? I’ve just made a minor update that should fix it — there was a slight conflict between the CSS of that theme and this component

3개의 좋아요

Yeah it was the mint, thank you

2개의 좋아요

How do I prevent the boxes being outlined with the category colour? I’ve tried forking it, adding css, and also changing the <li style in the categories-groups.hbs

(Note that I am a dabbler, not a trained developer)

3개의 좋아요

You can add a little CSS to your theme to remove the colorful borders:

.category-boxes .category-box {
  border-left: 2px solid var(--primary-low) !important;
}

or if you have the “fancy styling” setting turned on:

.custom-categories-groups .category-box {
    border: 2px solid var(--primary-low) !important;
}

1개의 좋아요

Thanks Kris,

It appears I’m having a bigger problem. For some reason, whenever I try to update the Theme component, it doesn’t pick up the changes at all. So my css was good, it just wasn’t being loaded. Not something for this thread, I’ll have a search around to see if there is something dumb I’m doing

1개의 좋아요

Would it be possible to have the fancy styling boxes with a latest section below the categories? In essence I want to do that same thing that the “Modern Categories + Group Boxes” component does in the Air Theme. You can select Categories with Latest for the desktop view and latest displays below the categories.

Im trying to edit my own version of the CSS but im no expert. Would this be an easy thing to do or might it be out of my skill set?

1개의 좋아요

I have this use case, where we have many categories, and sub-categories that are enabled, and they make the landing page very crowded, hard to find what interests the user.

Because of this, we want to customize the Category Groups landing page in a way that it is more targeted for the users in specific interest areas (via the user-groups).

So, I propose adding a visibility option for each category group. If any defined, the category group would be made visible only to those user-groups enabled in its settings.

I so created a pull-request to demonstrate what I mean by all this. Please let me know what you think of this option. Would you use it? Does it apply to your Discourse site?

https://github.com/discourse/discourse-category-groups-component/pull/51

p.s. This proposed new option should not be considered as alternative access-control. It simply controls what category groups will be visible for the logged-in user based on their group memberships. The existing permissions will still be in affect.

1개의 좋아요

Seems to not be showing after the latest Discourse updates, might need a update for this TC to work

(게시글이 작성자에 의해 삭제되었습니다)

호라이즌에서는 작동하지 않는 것이 맞나요?

1개의 좋아요