Using Umbraco Content Templates

27/01/2021 umbraco cms

In Umbraco, Content Templates let us set a blueprint for pages using the specified node type.

I have always wondered what a usecase for this may be, until my recent blog series "developer diary" where each week I take notes on what I have been up to using a recurring template each time. To make sure it's consistent each week and to save me time, I have used Content Templates. Let's have a wee look at how quickly we can set this up...

To set up a content template, let's navigate to "Settings" tab and right click. You'll get the option to create a Content Template and choose the relevant doctype.

 

We can then fill in the blueprint content, the stuff we want to appear whenever we create a new Blogpost Page. For me, it's making the content consistent week to week, for example title format.

 

We can do this for all content data types including out rich text area, so I can make sure I follow same format (with same emojis!) every week:

 

Now, when in the "Content" tab, we can create a node of using that template and get it defaulted to the template content we created! See demo video below!

You can read the Umbraco documentation on content templates here.

You can see the Umbraco documentation here.