# 更改类别的显示方式

**URL:** https://meta.discourse.org/t/changing-how-categories-are-displayed/116095
**Category:** Development
**Created:** [2019年四月26日 21:37 UTC](https://meta.discourse.org/t/changing-how-categories-are-displayed/116095 "2019-04-26T21:37:13Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![maniacalmorgan](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@maniacalmorgan](https://meta.discourse.org/u/maniacalmorgan)
#### Post date: [2019年四月26日 21:37 UTC](https://meta.discourse.org/t/changing-how-categories-are-displayed/116095/1 "2019-04-26T21:37:14Z")

</div>

I’ve been doing a little bit of digging, but to no avail. I’ve toyed with a number of various options and haven’t found what I’m looking for. Ultimately, I’m trying to display our categories in a manner similar to the screen shot below. I’d love to create groups of categories as displayed.

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/3/33cc6e5a183bb27084ad05c70dfe0d637b11c925.jpeg)

For some additional information, I’m aware of using subcategories. As it stands, I can’t cleanly display them in this format - at least not that I’ve discovered. Here’s what I’m looking for in a text format.

TEXT 1  
Category 1  
Category 2  
Category 3

TEXT 2  
Category 4  
Category 5  
Category 6

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2019年四月26日 22:55 UTC](https://meta.discourse.org/t/changing-how-categories-are-displayed/116095/2 "2019-04-26T22:55:57Z")

</div>

This has been asked previously here:

> [@Can it be done with CSS? Grouping categories on category page](https://meta.discourse.org/t/can-it-be-done-with-css-grouping-categories-on-category-page/112433):
>
> What I’d like to do (as I know there’s no baked in setting or feature set) is use CSS to group categories on the home page. I’m not looking to nest categories, but just group some together and possibly put a header on them. I know the individual categories can be “separated” with padding, and I know each category can be targeted by category ID or category name. So what I’m hoping is to be able to replicate something that looks like this: [image] I realize for simplicity, the categories would …

The consensus is that it’s not a straightforward thing to implement:

> [@Can it be done with CSS? Grouping categories on category page](https://meta.discourse.org/t/can-it-be-done-with-css-grouping-categories-on-category-page/112433/3):
>
> This kind of stuff is possible in a theme component but extremely complicated. I think you would need to override templates which makes this also pretty fragile.

---

<div class="post-metadata">

### Author: ![Cozdabuch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cozdabuch/32/139120_2.png) [@Cozdabuch](https://meta.discourse.org/u/Cozdabuch)
#### Post date: [2019年四月26日 23:02 UTC](https://meta.discourse.org/t/changing-how-categories-are-displayed/116095/3 "2019-04-26T23:02:08Z")

</div>

Man I wish they could find a way to just insert placeholders on the reorganize categories.

With a fillable txt box.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2019年四月26日 23:03 UTC](https://meta.discourse.org/t/changing-how-categories-are-displayed/116095/4 "2019-04-26T23:03:50Z")

</div>

If you’re sure it’s that easy why not submit a PR, or author a theme component to do it?

---

<div class="post-metadata">

### Author: ![Cozdabuch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cozdabuch/32/139120_2.png) [@Cozdabuch](https://meta.discourse.org/u/Cozdabuch)
#### Post date: [2019年四月27日 06:11 UTC](https://meta.discourse.org/t/changing-how-categories-are-displayed/116095/5 "2019-04-27T06:11:34Z")

</div>

I said I wish, not I have a clue how to 😬

---

<div class="post-metadata">

### Author: ![maniacalmorgan](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@maniacalmorgan](https://meta.discourse.org/u/maniacalmorgan)
#### Post date: [2019年四月29日 13:47 UTC](https://meta.discourse.org/t/changing-how-categories-are-displayed/116095/6 "2019-04-29T13:47:45Z")

</div>

Thanks for the answer! I’ll have to lean on our dev team to get creative with some CSS.

---

<div class="post-metadata">

### Author: ![cosdesign](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cosdesign/32/208585_2.png) [@cosdesign](https://meta.discourse.org/u/cosdesign)
#### Post date: [2021年二月9日 21:24 UTC](https://meta.discourse.org/t/changing-how-categories-are-displayed/116095/7 "2021-02-09T21:24:26Z")

</div>

两年过去了，但总比没有好 😄。如果你还需要，可以看看 [我的回答](https://meta.discourse.org/t/can-it-be-done-with-css-grouping-categories-on-category-page/112433/4?u=cosdesign)。
