Geta

Meny NO

EPiServer Instant Templates

Instant Templates is a new module for EPiServer that allows content editors to create their own re-usable templates from within EPiServer edit mode.

It’s up on EPiServer NuGet feed as a beta package. In order to install it you have to include prerelease packages.

Install-Package EPiServer.InstantTemplates -Prerelease

Feel free to take a look at the source code. We’re storing the Templates as normal ContentData in a custom ContentRepository, which is also displayed in the assets pane as a component there.

The New From Template command displays these templates to the editor (only showing the allowed templates for that editor). When a template is chosen we copy that template’s ContentData to the selected location and create a new page there.

There are quite a few different scenarios where this would be useful. You can easily lock down certain parts of a template, access control it and use shared blocks to provide a great starting point for new content.

Source code and sample project: https://github.com/Geta/InstantTemplates.

kommentarer drevet av Disqus