# Reply Template

**URL:** https://meta.discourse.org/t/reply-template/162373
**Category:** Theme component
**Tags:** official, reply-template
**Created:** [August 28, 2020, 6:23pm UTC](https://meta.discourse.org/t/reply-template/162373 "2020-08-28T18:23:36Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [August 28, 2020, 6:23pm UTC](https://meta.discourse.org/t/reply-template/162373/1 "2020-08-28T18:23:36Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Reply Template** will let you easily reuse part of a post in a reply or a new topic. |
| :eyeglasses: | **Preview** | [Preview on Discourse Theme Creator](https://discourse.theme-creator.io/theme/Discourse/reply-template) |
| :hammer_and_wrench: | **Repository Link** | [https://github.com/discourse/discourse-reply-template-component](https://github.com/discourse/discourse-reply-template-component) |
| :open_book: | **New 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

> [@](#):
>
> :discourse2: As this is an #official theme component maintained by the Discourse team, #Support, #Contribute > Bug, #Contribute > UX, and #Contribute > Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate theme component tag. Click on a link below to get one started. :+1:
> 
> [:question:&nbsp; **Support**](https://meta.discourse.org/new-topic?category_id=6&tags=reply-template "Ask for support on configuring and using Reply Template") [:bug:&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=reply-template "A bug report means something is broken, preventing normal/typical use of the theme component") [:eyes:&nbsp; **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=reply-template "Discussion about the user interface of Reply Template, and how features are presented (including language and UI elements)") [:bulb:&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=reply-template "Discussion about how existing Reply Template features can be improved or enhanced, and how proposed new features could work")

### Features

**Reply Template** will let you easily reuse part of a post in a reply or a new topic.

### Usage

```plaintext
[wrap=template key="template-name"]
My reusable content

- [] task 1
- [] task 2
[/wrap]

```

Note that if a user is not logged in, clicking the button will display the login modal.

**key is mandatory**

### Other options

- `action="create"` this will make the button open a composer to create a new topic
- `action="create_pm"` this will make the button open a composer to create a new PM
- `categoryId="2"` only usable with `action="create"`, will set the category of the opened composer
- `title="some title"` only usable with `create` and `create_pm`, title of the topic/pm
- `recipients="a@example.com"` only usable with `create_pm`, people this will be sent to
- `usernames=sam` only usable with `create_pm`
- `label="My button text"` The button text

### Placeholders

You can have special keys in your template which will get replaced:

- $week\_start → date at the beginning of the week
- $week\_end → date at the end of the week
- $prev\_week\_start → date at the start of previous week
- $prev\_week\_end → date at the end of previous week
- $today
- $tomorrow
- $username → username of current user
- $name → name of current user

Note that this will be replaced by local dates.

Special placeholders are also interpolated in `title`

### Tags list

`tagsList=":heart:,foo,#bar`" will show a least of checkboxes at the end of the template so people can tag their post easily.

 ![reply template example](https://global.discourse-cdn.com/meta/original/3X/d/0/d01db23aa5481b1a984bef0d9088ade04f1cc35b.png)

## Example

My todo list $week\_end

- task 1
- task 2

### Settings

| Translation | Default |
| --- | --- |
| discourse\_reply\_template\_component.use\_template\_reply | Use template as reply |
| discourse\_reply\_template\_component.use\_template\_create | Use template as new topic |
| discourse\_reply\_template\_component.use\_template\_create\_pm | Use template as new PM |
| discourse\_reply\_template\_component.needs\_key | Each template needs a key attribute. eg: `[wrap=template key="weekly_status"][/wrap]` |

  

> :discourse2: **Hosted by us?** Theme components are available to use on our Pro, Business, and Enterprise plans.

> Last edited by @Moin 2026-07-10T21:15:09Z
> 
> Last checked by @joo 2025-06-08T15:57:59Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<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: [September 20, 2020, 4:33pm UTC](https://meta.discourse.org/t/reply-template/162373/2 "2020-09-20T16:33:10Z")

</div>

I was wondering can this be used in a specific category/sub?

Ie bug reporting form?

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [October 2, 2020, 1:40pm UTC](https://meta.discourse.org/t/reply-template/162373/3 "2020-10-02T13:40:55Z")

</div>

> [@Heliosurge](#):
>
> I was wondering can this be used in a specific category/sub?

Yes :arrow_down:

> [@joffreyjaffeux](#):
>
> `categoryId="2"` only usable with `action="create"` , will set the category of the opened composer

E.g.  
`[wrap=template key="bug-report" action="create" categoryId="your-bug-category-id"]`

---

<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: [October 5, 2020, 5:46pm UTC](https://meta.discourse.org/t/reply-template/162373/4 "2020-10-05T17:46:36Z")

</div>

Thank you will need to explore this more.

---

<div class="post-metadata">

### Author: ![debryc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/debryc/32/101652_2.png) [@debryc](https://meta.discourse.org/u/debryc)
#### Post date: [October 22, 2020, 11:31am UTC](https://meta.discourse.org/t/reply-template/162373/5 "2020-10-22T11:31:14Z")

</div>

This is the best. Thank you!! I use this to create checklist templates that can be created anytime we’re doing a repetitive project. Before, our instructions would have been “copy and paste everything below” instead of having this very elegant button to create a topic for people.

---

<div class="post-metadata">

### Author: ![debryc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/debryc/32/101652_2.png) [@debryc](https://meta.discourse.org/u/debryc)
#### Post date: [October 22, 2020, 11:37am UTC](https://meta.discourse.org/t/reply-template/162373/6 "2020-10-22T11:37:29Z")

</div>

Is there a plan to make this functionality accessible in the composer window? To me the most logical place being where things like Hide Details and Build Poll live.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [October 26, 2020, 7:24am UTC](https://meta.discourse.org/t/reply-template/162373/7 "2020-10-26T07:24:01Z")

</div>

I just updated the component, see OP for usage but a quick note:

- placeholder dates are now replaced by local dates
- you can now define a tagsList

 ![Capture d’écran 2020-10-26 à 08.21.01](https://global.discourse-cdn.com/meta/original/3X/d/0/d01db23aa5481b1a984bef0d9088ade04f1cc35b.png)

---

<div class="post-metadata">

### Author: ![Ed\_Bobkov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_bobkov/32/200014_2.png) [@Ed\_Bobkov](https://meta.discourse.org/u/Ed_Bobkov)
#### Post date: [February 9, 2021, 7:50pm UTC](https://meta.discourse.org/t/reply-template/162373/8 "2021-02-09T19:50:45Z")

</div>

Thank you for a great component!

It’s impossible to add a poll in the wrap. Can you add this functionality?

```plaintext
[wrap=template key="template-name"]

[poll type=regular results=on_vote chartType=bar]
# Who will join?
* 1
* 2
* 3
[/poll]

[/wrap]

```

---

<div class="post-metadata">

### Author: ![Ed\_Bobkov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_bobkov/32/200014_2.png) [@Ed\_Bobkov](https://meta.discourse.org/u/Ed_Bobkov)
#### Post date: [February 16, 2021, 12:51am UTC](https://meta.discourse.org/t/reply-template/162373/9 "2021-02-16T00:51:43Z")

</div>

I added more locales to your component and created a PR. Please, check.

---

<div class="post-metadata">

### Author: ![nobodyfrm](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@nobodyfrm](https://meta.discourse.org/u/nobodyfrm)
#### Post date: [April 16, 2021, 8:33pm UTC](https://meta.discourse.org/t/reply-template/162373/10 "2021-04-16T20:33:24Z")

</div>

How can i install this component?

In my opinion it’d be more helpful to have an example for the reply case (without action=create) because this is probably the reason, the majority is searching for since creating a topic is already possible via URL

My try:

- ok
- fail

---

<div class="post-metadata">

### Author: ![debryc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/debryc/32/101652_2.png) [@debryc](https://meta.discourse.org/u/debryc)
#### Post date: [April 28, 2021, 8:59pm UTC](https://meta.discourse.org/t/reply-template/162373/12 "2021-04-28T20:59:44Z")

</div>

Would it be possible to use a template to create a new personal message?

Also, when someone is not signed in, clicking on “Use template as reply” does not result in any action. Could you add functionality where if a user is not logged in, something happens to nudge them to log in or create a new account?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [May 1, 2021, 11:01am UTC](https://meta.discourse.org/t/reply-template/162373/13 "2021-05-01T11:01:29Z")

</div>

Great suggestion, it’s done, I updated the OP.

---

<div class="post-metadata">

### Author: ![debryc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/debryc/32/101652_2.png) [@debryc](https://meta.discourse.org/u/debryc)
#### Post date: [June 25, 2021, 8:16pm UTC](https://meta.discourse.org/t/reply-template/162373/14 "2021-06-25T20:16:27Z")

</div>

Is there a way to pre-populate the title of a new topic?

Is there a way to automatically add tags instead of having just the tag list?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 25, 2021, 10:02pm UTC](https://meta.discourse.org/t/reply-template/162373/15 "2021-06-25T22:02:39Z")

</div>

No, but that’s reasonable feature request for sure. I’m kinda full ATM but making a note of this, thanks.

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [June 29, 2021, 8:46am UTC](https://meta.discourse.org/t/reply-template/162373/16 "2021-06-29T08:46:13Z")

</div>

Is there any possible way to modify the stock reply button in a topic with such a template?  
That would be a gamechanger for specific structured conversations in the forum. Especially for contests etc where users have to submit content in a structured manner.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 29, 2021, 8:59am UTC](https://meta.discourse.org/t/reply-template/162373/17 "2021-06-29T08:59:44Z")

</div>

Hi, sorry I don’t understand your request, can you be more specific please ?

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [June 29, 2021, 10:29am UTC](https://meta.discourse.org/t/reply-template/162373/18 "2021-06-29T10:29:05Z")

</div>

Currently the user can access the reply template only via the button in the first post generated by the theme component.  
What I would like to achieve is to enable the template for the stock reply buttons in the topic as well (reply button below the timeline and reply button below the last post)

Edit: One prolific use case is a topic where users can leave feedback like bug reports etc. If we could add per-topic post templates just like for per-category templates for new topics, that would lead to less incomplete reports and hence save our staff a lot of time.

---

<div class="post-metadata">

### Author: ![Sugarhouse](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Sugarhouse](https://meta.discourse.org/u/Sugarhouse)
#### Post date: [January 10, 2022, 5:42am UTC](https://meta.discourse.org/t/reply-template/162373/19 "2022-01-10T05:42:50Z")

</div>

Hello,

I am having some trouble installing this component. I’m new to Discourse so hoping someone can confirm if the steps I’ve taken are correct.

I followed the guide here [Installing a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) to install the component. I’ve included the component on all of our themes.

However, when I create a new topic and include

My reusable content

- task 1
- task 2

There is no button for “Use template as reply”. Example:

 ![Template screenshot](https://global.discourse-cdn.com/meta/original/3X/f/c/fc552769d179e28d224411eb1ec56091473410d0.png)

It just shows the wrapper around the template. Am I missing a step here? Is there something I need to customise in the code?

Also, Discourse is saying the theme has errors either in CSS, HTML or YAML. I’m not sure if that has something to do with why the button doesn’t display?

Thanks for any help.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [January 10, 2022, 4:50pm UTC](https://meta.discourse.org/t/reply-template/162373/20 "2022-01-10T16:50:48Z")

</div>

Will have a look tomorrow

---

<div class="post-metadata">

### Author: ![Sugarhouse](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Sugarhouse](https://meta.discourse.org/u/Sugarhouse)
#### Post date: [January 10, 2022, 11:12pm UTC](https://meta.discourse.org/t/reply-template/162373/21 "2022-01-10T23:12:31Z")

</div>

Thanks. I’ve been informed it may also be an issue with the version of Discourse we’re running but will come back on that.

[Next page](https://meta.discourse.org/t/reply-template/162373.md?page=2)
