# 如何创建自定义按钮？

**URL:** https://meta.discourse.org/t/how-to-create-a-custom-button/157717
**Category:** Development
**Created:** [2020年七月14日 16:04 UTC](https://meta.discourse.org/t/how-to-create-a-custom-button/157717 "2020-07-14T16:04:46Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [2020年七月14日 16:40 UTC](https://meta.discourse.org/t/how-to-create-a-custom-button/157717/2 "2020-07-14T16:40:16Z")

</div>

> [@AntiMetaman](#):
>
> 我想在我的论坛中创建一个类似于图片画廊的分类。如果用户在此分类中发帖，帖子将以网格形式显示，包含图片缩略图以及带有用户浏览量、评分（点赞）和发布日期等信息的标题。
> 
> 请注意，只有该特定分类应显示为网格布局，其他分类则不显示。

请查看以下主题组件：

> [@User Portfolio](https://meta.discourse.org/t/user-portfolio-theme-component/156678):
>
> discourse2Summary User Portfolio adds a new “Portfolio” tab to the user profile. It can be configured to show the user’s topics from a specific category and/or tag. It also works great alongside the [Topic List Thumbnails](https://meta.discourse.org/t/topic-list-thumbnails-theme-component/150602)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-user-portfolio](https://github.com/discourse/discourse-user-portfolio)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 Features

> [@Featured Tiles](https://meta.discourse.org/t/featured-tiles-theme-component/156677):
>
> discourse2Summary Featured Tiles adds a row of featured tiles above topic lists.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/featured-tiles)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-featured-tiles](https://github.com/discourse/discourse-featured-tiles)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 Features Featured Tiles adds a row of featured tiles above topic lists. On hover, the topic titl…

> [@Topic List Thumbnails](https://meta.discourse.org/t/topic-list-thumbnails-theme-component/150602):
>
> discourse2Summary Topic List Thumbnails allows you to show topic thumbnails in topic list views.eyeglassesPreview [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/topic-list-thumbnails-blog) (blog style) [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/topic-list-thumbnails-grid) (grid) [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/topic-list-thumbnail-list) (list) [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/topic-list-thumbnails-masonry) (masonry) [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/topic-list-thumbnails-minimal-grid) (minimal grid)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-topic-thumbnails](https://github.com/discourse/discourse-topic-thumbnails)open_bookNew to Discourse Themes? [Begi…](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966)

> [@AntiMetaman](#):
>
> 顺便提一下，我指的是那些按钮。

如果您想在那里添加按钮，可以逆向工程其他已成功实现该功能的插件，例如 [Formatting toolbar](https://meta.discourse.org/t/formatting-toolbar/40649) 插件。

我不确定您这个功能的具体使用场景，但正因为 Discourse 是免费且开源的，您可以根据需要对其进行自定义！

---

_[View the full topic](https://meta.discourse.org/t/how-to-create-a-custom-button/157717)._
