Topic templates for categories and other alternatives

Topic templates are a useful tool to reinforce forum conventions or to guide new users.

Category topic templates

Some categories might follow a strict pattern. One such example would be a Movies category, wherein you’d like users to start new topics according to a certain template:

I saw: insert movie title

I think it was worth: how many stars out of 4 stars

Review here:

To apply this template to all new topics posted in this category, go to a category, click the :wrench: button and find “Topic Template” in the left menu:

You can see a live example of this if you register on our Try sandbox forum and post a new topic to the Movies category.

Tip: You can add comments to the template using HTML comments.

<!-- I'm an HTML comment -->

Alternatives

Here are a few alternatives to consider if category topic templates aren’t exactly what you’re looking for.

Create a link to pre-fill a topic

It’s also possible to create URL that, when clicked, will open a pre-filled topic. To compose a new pre-filled topic, modify URL params like this:

https://discourse.example.com/new-topic?title=topic%20title&body=topic%20body&category=category/subcategory

This will open composer window pre filled with topic title, body and desired category.

See this guide for more details: Create a link to start a new topic with pre-filled information

Reply templates

Some topics expect a strict pattern for their replies. The Reply Template theme component can be used to encourage your users to provide a structured reply to the topic.

See the theme component topic for more details: Reply Template

[wrap=template key="template-name"]
Task list for $tomorrow

- [ ] task 1
- [ ] Clean the <!-- FILL IN ROOM NAME: --> _
[/wrap]

Create topics to use as templates for canned replies

The Discourse Templates plugin uses one or more categories to store the templates for later use. The first post on each topic in these categories will be used as the template for the replies.

20 Likes