SaaS CMS has officially launched! Learn more now.

Global Templates



Is it possible to create a Global Template in Episerver 8. It was possible in 6 R2 but im not sure how this can be done in 8.



Aug 21, 2015 15:51


What is a global template?

Aug 21, 2015 16:53


My apologies - I dont mean Global. In Episerver 6 R2 I could create Composer page templates which had default composer blocks already in place and all the user had to do is to over write the text in each block to create a new page. This saved them time adding the composer blocks to the page. This was ideal for News and Blog pages as the page layout would be the same.

I hope this makes sense and sorry for the confusion.


Aug 21, 2015 16:58

I guess you could achive the same with local blocks, or by creating and then adding blocks to the page in the CreatedContent event.

Aug 21, 2015 17:01

Hi, What are local blocks?

Aug 21, 2015 17:03
Vote: This might be appropriate for some of the content on the page, but I guess you want content areas as well where the editors have more freedom to create whatever they want.

Aug 21, 2015 17:07

There is a feature on the roadmap called "Instant Templates". This should enable similar functionality to that described above. I bellieve its due to become available in the Fall 2015 release.


Aug 21, 2015 19:02

I really hope this 'instant templates' becomes available quickly.

Still struggling with creating a shared block at the moment the page of a certain pagetype is created:

There are several solutions on the net available but most are for Episerver 6.  I try to do it now by working with the CreatedContent event. The problem is this event creates a readonly version of the page. I try to use CreateWritableClone to work with a version of the page i can modify, but strangely this version doesn't recognize the contentarea properties to put the blocks in???

 public void contentEvents_CreatedContent(object sender, EPiServer.ContentEventArgs e)
            // This code adds blocks to a page
            if (e.Content is ContentPage)

                ContentPage myContent = e.Content as ContentPage;

                var contentAssetHelper = ServiceLocator.Current.GetInstance<ContentAssetHelper>();
                ContentAssetFolder folder = contentAssetHelper.GetOrCreateAssetFolder(e.Content.ContentLink);

                var contentRepository = ServiceLocator.Current.GetInstance<IContentRepository>();
                var contentTypeRepository = ServiceLocator.Current.GetInstance<IContentTypeRepository>();

                var writablePage = myContent.CreateWritableClone();

                var blockType = contentTypeRepository.Load<DefaultContact>();
                var block = contentRepository.GetDefault<IContent>(folder.ContentLink, blockType.ID, ContentLanguage.PreferredCulture);
                block.Name = "My new awesome block";
                var BlockReference = contentRepository.Save(block, SaveAction.Publish, AccessLevel.NoAccess);

                if (writablePage != null)
                    writablePage.RightColumn.Items.Add(new ContentAreaItem()
                        ContentLink = BlockReference

                    contentRepository.Save(writablePage, SaveAction.Save);


The code refuses to work with 'writablePage.RightColumn' , this property is not recognized, while it does exist (myContent.RightColumn does work but is readonly)

What am i doing wrong?

Edited, Sep 25, 2015 12:21

Hi Ron

CreatedContent fires after the content has been created, you could try CreatingContent instead as this fires before the content is created so may allow you to do what you want.


Sep 25, 2015 12:28

The problem is i have to create a block in the proper folder (the page folder of the page) and this contentassetfolder is only available after saving the content, not before...

Sep 25, 2015 12:33

What do you mean by not 'recognized'? If the property is null, you have to instatiate it.

Sep 25, 2015 12:44

var writablePage = myContent.CreateWritableClone() as ContentPage;

and you might need
writablePage.RightColumn = new ContentArea();
if it's null.

Sep 25, 2015 13:56

Ah that's it, i tried any combination except this one...Thanks!

Sep 25, 2015 14:00

Hi all

I know this is an old thread but wanted to make sure people know that Instant Templates is now available:


Jan 15, 2016 13:02
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.