# 카테고리 홈에서 3단계 카테고리를 숨기되 레이아웃을 유지하는 옵션

**URL:** https://meta.discourse.org/t/option-to-hide-3rd-level-categories-on-the-categories-homepage-without-losing-the-layout/410242
**Category:** Feature
**Tags:** categories
**Created:** [8월 17, 2026, 5:41오후 UTC](https://meta.discourse.org/t/option-to-hide-3rd-level-categories-on-the-categories-homepage-without-losing-the-layout/410242 "2026-08-17T17:41:43Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [8월 24, 2026, 9:59오후 UTC](https://meta.discourse.org/t/option-to-hide-3rd-level-categories-on-the-categories-homepage-without-losing-the-layout/410242/3 "2026-08-24T21:59:17Z")

</div>

합리적인 요청입니다. 하위 카테고리가 여러 레벨로 구성되어 있으면도 카테고리가 적을 경우, /categories 페이지의 레이아웃을 균형 있게 맞추는 것이 어려울 수 있습니다.

`modifyClass`를 더 이상 사용하지 않기를 바랍니다. 말씀하신 대로, 이러한 종류의 오버라이드를 유지보수하려면 개발에 상당한 노력이 필요하기 때문입니다.

지금부터는 안정적으로 유지하기가 더 쉬운 새로운 커스터마이징 방법을 활용할 수 있습니다. 이 경우 값 변환기(value transformer)가 도움이 될 수 있습니다. 곧 업데이트에서 사용 가능할 예정인 변환기를 하나 추가했습니다: [DEV: Add a category-list-subcategories value transformer - Pull Request #42804 - discourse/discourse - GitHub](https://github.com/discourse/discourse/pull/42804)

간단한 데모는 다음과 같습니다:

```js
api.registerValueTransformer(
  "category-list-subcategories",
  ({ value, context }) =>
  context.page === "categories" && context.category.level >= 1 ? [] : value
);

```

이 코드는 하위 카테고리를 단 한 레벨만 표시합니다. 이제 변환기를 사용하여 사용할 수 있는 다른 옵션들이 있으므로, 이를 지원하기 위해 유지보수할 수 있는 테마 컴포넌트를 구성했습니다.

따라서 Discourse를 업데이트한 후 이 컴포넌트를 설치하면 /categories 및 기타 일부 카테고리 목록에서 몇 개의 하위 카테고리를 표시할지 제어할 수 있습니다:

> **[GitHub - discourse/discourse-subcategory-control-component](https://github.com/discourse/discourse-subcategory-control-component)**
>
> Contribute to discourse/discourse-subcategory-control-component development by creating an account on GitHub.

`Categories page depth` 값을 2로 설정하면 모든 증손자 카테고리(grandchild categories)를 숨길 수 있습니다.

---

_[View the full topic](https://meta.discourse.org/t/option-to-hide-3rd-level-categories-on-the-categories-homepage-without-losing-the-layout/410242)._
