# Topic Templates

**URL:** https://meta.discourse.org/t/topic-templates/18282
**Category:** Feature
**Created:** [30.Июль.2014 18:55:51 UTC](https://meta.discourse.org/t/topic-templates/18282 "2014-07-30T18:55:51Z")
**Posts on this page:** 16
**Page:** 2

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [02.Июль.2015 01:43:10 UTC](https://meta.discourse.org/t/topic-templates/18282/21 "2015-07-02T01:43:10Z")

</div>

This is something we have talked about for a while, and @eviltrout will implement very soon. We have an enterprise customer that needs it.

Basically, a **default first post template** that can apply at the category level. Every time you create a new topic in that category, the first post will be pre-filled with the topic template text that you specified via Edit Category, as part of the category properties.

cc: @Jody

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [03.Июль.2015 16:51:05 UTC](https://meta.discourse.org/t/topic-templates/18282/22 "2015-07-03T16:51:05Z")

</div>

The first shot at this is now deployed. You can edit a Topic Template in the Edit Category modal. What you provide there will be present when a user tries to create a new topic in that category.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [03.Июль.2015 17:20:45 UTC](https://meta.discourse.org/t/topic-templates/18282/23 "2015-07-03T17:20:45Z")

</div>

I added a template to the movies category on try if people want to see how the feature works:

> **[movies](https://try.discourse.org/c/movies/8)**
>
> Topics about movies and television, including reviews, news, commentary and other discussion.

It will fill in a review template when you create a topic there.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [04.Июль.2015 06:29:50 UTC](https://meta.discourse.org/t/topic-templates/18282/24 "2015-07-04T06:29:50Z")

</div>

Here is what that looks like:

 ![](https://global.discourse-cdn.com/meta/original/3X/3/7/370854a3f01725723209e513bae9872a6ee4105d.jpg) 

One thing that surprised me, selecting Movies from the category drop down did not trigger this, only creating the topic from within the Movies category (and thus defaulting to that category) worked.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [06.Июль.2015 15:48:59 UTC](https://meta.discourse.org/t/topic-templates/18282/25 "2015-07-06T15:48:59Z")

</div>

Other tricky case is selection of category after the fact, but for blank body it should be trivial to improve

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [06.Июль.2015 16:57:06 UTC](https://meta.discourse.org/t/topic-templates/18282/26 "2015-07-06T16:57:06Z")

</div>

I like this a lot, but I miss not being able to pre-populate the title like I can with @techAPJ’s custom URL parameters. It would help bring the two into parity.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [06.Июль.2015 17:25:01 UTC](https://meta.discourse.org/t/topic-templates/18282/27 "2015-07-06T17:25:01Z")

</div>

Not sure I support a title template here. Can you describe why this would be useful?

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [06.Июль.2015 17:51:53 UTC](https://meta.discourse.org/t/topic-templates/18282/28 "2015-07-06T17:51:53Z")

</div>

> [@codinghorror](#):
>
> Can you describe why this would be useful?

Because we already have links to our Q&A category that have pre-populated title template using the URI query params. That link is used in various places that instruct people to ask a question. So having the + New Topic button on the category page, that fills the same information, would provide a more consistent experience for everyone asking questions.

---

<div class="post-metadata">

### Author: ![adopilot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adopilot/32/105040_2.png) [@adopilot](https://meta.discourse.org/u/adopilot)
#### Post date: [06.Июль.2015 23:02:37 UTC](https://meta.discourse.org/t/topic-templates/18282/29 "2015-07-06T23:02:37Z")

</div>

Thanx on doing great job.  
If we can get more strongly types of templates, so it can looks like forms.  
Example, make template with date, and push useres to enter date only, also make template whit some kind drop n down list, also required fields.  
And all that coocked nice in htm so others api calls can easly extract data whituot bunc if regex and logic.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [06.Июль.2015 23:10:14 UTC](https://meta.discourse.org/t/topic-templates/18282/30 "2015-07-06T23:10:14Z")

</div>

That sounds more like a form than a template.

Seems to me if a member sees something like

~enter date here~

they should be able to figure it out without having script check on it.

Not that a form is a bad idea. It would be good for ensuring the post absolutely meets the format. But don’t you think it might be overkill?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [06.Июль.2015 23:24:56 UTC](https://meta.discourse.org/t/topic-templates/18282/31 "2015-07-06T23:24:56Z")

</div>

No – that is wildly out of scope for what we are trying to do with basic templates.

---

<div class="post-metadata">

### Author: ![adopilot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adopilot/32/105040_2.png) [@adopilot](https://meta.discourse.org/u/adopilot)
#### Post date: [06.Июль.2015 23:29:05 UTC](https://meta.discourse.org/t/topic-templates/18282/32 "2015-07-06T23:29:05Z")

</div>

> [@Mittineague](#):
>
> think it might be overkill?

My idea is to have only one app for interacting with users.  
We can setup BUG tracking app in less then hour but that take years for users to push them to use.  
Same for Calendar, meeting aps and so many,  
Users simply do dot want to swich apps,  
When we push them to use forum beside calling on phone ot sending mails, we are so happy.

We are using discourse in enterprise envroment where is changing habits and workflows extremly hard.  
My idea is to have one robust super sistem for almost everthing when it is word about users interacting with each oters.  
For calculationts there is Erp but for communication there is discourse

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [07.Июль.2015 18:42:19 UTC](https://meta.discourse.org/t/topic-templates/18282/33 "2015-07-07T18:42:19Z")

</div>

> [@codinghorror](#):
>
> selecting Movies from the category drop down did not trigger this, only creating the topic from within the Movies category (and thus defaulting to that category) worked.

I’ve fixed this case. If the post is blank and you choose a category with a template, it will replace your blank content. If you’ve typed something that remains:

[https://github.com/discourse/discourse/commit/724781f42694a3ae31f4f50e5721a11af788061a](https://github.com/discourse/discourse/commit/724781f42694a3ae31f4f50e5721a11af788061a)

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [07.Июль.2015 19:00:05 UTC](https://meta.discourse.org/t/topic-templates/18282/34 "2015-07-07T19:00:05Z")

</div>

You should also check if the current content is identical to the previous categoryId value.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [11.Август.2015 08:03:09 UTC](https://meta.discourse.org/t/topic-templates/18282/36 "2015-08-11T08:03:09Z")

</div>

This is complete, closing it.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [11.Август.2015 08:03:12 UTC](https://meta.discourse.org/t/topic-templates/18282/37 "2015-08-11T08:03:12Z")

</div>



[Предыдущая страница](https://meta.discourse.org/t/topic-templates/18282.md?page=1)
