# Как создать блок «Рекомендуемые категории» на главной странице?

**URL:** https://meta.discourse.org/t/any-way-to-create-a-featured-categories-body-on-the-homepage/303589
**Category:** Support
**Created:** [12.Апрель.2024 17:19:06 UTC](https://meta.discourse.org/t/any-way-to-create-a-featured-categories-body-on-the-homepage/303589 "2024-04-12T17:19:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![DonkeyKongEnjoyer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/donkeykongenjoyer/32/377672_2.png) [@DonkeyKongEnjoyer](https://meta.discourse.org/u/DonkeyKongEnjoyer)
#### Post date: [12.Апрель.2024 17:19:06 UTC](https://meta.discourse.org/t/any-way-to-create-a-featured-categories-body-on-the-homepage/303589/1 "2024-04-12T17:19:06Z")

</div>

Я хочу создать на своей главной странице макет, похожий на этот из компонента темы «Избранные списки», но вместо тем в теле хочу отображать категории. При клике на эти категории должна открываться соответствующая категория со всеми её темами.

(Блок слева взят из темы компонента темы «Избранные списки», а блок справа — это то, чего я пытаюсь добиться. Отображение категорий вместо тем.)

 ![featureboth](https://global.discourse-cdn.com/meta/original/4X/6/5/2/65211c64f3fea8b37e3ed4dd2cd87651fb523f66.png)

Возможно ли что-то подобное — либо с помощью компонента темы, либо через CSS? Спасибо!

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [13.Апрель.2024 01:01:30 UTC](https://meta.discourse.org/t/any-way-to-create-a-featured-categories-body-on-the-homepage/303589/2 "2024-04-13T01:01:30Z")

</div>

Не уверен, что это то, что вы ищете.

> [@Category Groups](https://meta.discourse.org/t/category-groups/200874?u=heliosurge):
>
> discourse2Summary Category Groups allows you to assign categories to groups, which are then used to sort and collapse categories on the categories page.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/category-groups)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-category-groups-component](https://github.com/discourse/discourse-category-groups-component)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Featuresinformation_source Important things to n…

Или вот этот:

> [@Featured Categories Header](https://meta.discourse.org/t/featured-categories-header/203779):
>
> bookmark_tabsSummary Feature categories on select views.hammer_and_wrenchRepository Link [Manuel Kostka / Discourse / Components / Featured Categories · GitLab](https://gitlab.com/manuelkostka/discourse/components/featured-categories.git)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Cards view List view Settings You can switch between the two above layouts or choose none and declare your own styles. You …

Также есть современный вариант группировки категорий в виде блоков, используемый в теме Air. Доступен на GitHub.

Но выглядит это примерно так:

 ![Screenshot_20240412-220447](https://global.discourse-cdn.com/meta/original/4X/d/f/1/df1e17c7a36b9c561e9953e63be37b6ebfbae6d4.jpeg)

Каждая группа категорий под заголовком.

---

<div class="post-metadata">

### Author: ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)
#### Post date: [14.Апрель.2024 11:03:53 UTC](https://meta.discourse.org/t/any-way-to-create-a-featured-categories-body-on-the-homepage/303589/3 "2024-04-14T11:03:53Z")

</div>

Вы можете посмотреть этот компонент: [https://gitlab.com/manuelkostka/discourse-featured-categories.git](https://gitlab.com/manuelkostka/discourse-featured-categories.git). Он должен сделать именно то, что вы ищете:

 ![Скриншот от 2024-04-14 11-57-46](https://global.discourse-cdn.com/meta/original/4X/0/c/3/0c374d6aa1b34aa2fb478826d085874ca16ee512.png)

В нём настроена базовая разметка списка. Однако я пока не определял другие макеты и, скорее всего, не буду этого делать, пока они не понадобятся в проекте. Поэтому, если вы захотите настроить макет, вам придётся разобраться с CSS самостоятельно.

---

<div class="post-metadata">

### Author: ![DonkeyKongEnjoyer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/donkeykongenjoyer/32/377672_2.png) [@DonkeyKongEnjoyer](https://meta.discourse.org/u/DonkeyKongEnjoyer)
#### Post date: [15.Апрель.2024 21:12:44 UTC](https://meta.discourse.org/t/any-way-to-create-a-featured-categories-body-on-the-homepage/303589/4 "2024-04-15T21:12:44Z")

</div>

> [@Dan DeMontmorency](#):
>
> Не уверен, возможно, это именно то, что вы ищете.

> [@Manuel Kostka](#):
>
> Вы можете посмотреть этот компонент:

Спасибо! Я обязательно это проверю 👍

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [16.Апрель.2024 04:42:43 UTC](https://meta.discourse.org/t/any-way-to-create-a-featured-categories-body-on-the-homepage/303589/5 "2024-04-16T04:42:43Z")

</div>

Вот ссылка на GitHub для последнего — «Modern Category + Group Boxes»:

> **[GitHub - discourse/discourse-minimal-category-boxes](https://github.com/discourse/discourse-minimal-category-boxes)**
>
> Contribute to discourse/discourse-minimal-category-boxes development by creating an account on GitHub.
