Skip to main content
Version: Current (v17+)

uSync.AutoTemplates

uSync.AutoTemplates is a package for Umbraco that allows you to create templates from your code editor instead of using the backoffice.

Auto-Templates "watches" your templates folder, and when you create a .cshtml file, Auto-Templates reads that file, works out what it is, and adds it to the Umbraco database so it will show up in the backoffice.

Installation​

To install uSync.AutoTemplates, you can add the package through the command-line:

dotnet add package uSync.AutoTemplates

Then, Auto-Templates needs to be enabled. To do this, add the following setting to the appsettings.json file:

"uSync": {
"AutoTemplates": {
"Enabled": true,
}
}

Now you can start making templates.

Using Auto-Templates​

Once Auto-Templates is installed, you can make your templates. In your code editor, open the templates file of your Umbraco site. Then, create your new template as a .cshtml file, and customise it to your liking.

Your new templates should appear in the backoffice under Settings --> Templates.

Auto-Templates uses the Layout value to determine the parent template in the Umbraco backoffioce.