EPiServer Template Foundation module installer available
Stefan Forsberg recently blogged about creating a module installer for ETF using a Module Installer Project which is part of the EPiServer Power Tools available for download from EPiServer.
However, since the EPiServer Power Tools only are available for Visual Studio 2008 I decided to create an installer from scratch using PowerShell and EPiServer XML transformations for configuration updates. The ETF module installer is available now on Codeplex – this post explains how it works.
Download the ETF module installer
Download the ETF module installer from Codeplex and extract the “ETF” folder to the EPiServer “Modules” folder:
If you have EPiServer CMS 6 R2 installed you should extract it to the “Modules” folder for R2 as well:
Start EPiServer Deployment Center
On my computer I have a basic setup of the Alloy Technologies sample website:
We’ll add ETF to it by starting EPiServer Deployment Center and selecting the “Add EPiServer Template Foundation” option:
The install script is signed, but you may have to allow it to run (depending on your PowerShell script security settings):
After clicking Run we’re presented with some options for the ETF install:
By default the installer will copy the ETF assembly and update web.config to add required settings.
You can optionally choose to have ETF display a British flag for the “en” language branch if you want. The fourth option is probably only interesting for us (we use it to add our logo to the EPiServer login screen).
For now we’ll select all options to see what happens! :)
After clicking Next we’re able to select which website we want to add ETF to:
We hit Install to add ETF to the site, and in about a second we see a confirmation that the install has completed:
Since we checked the “Add Ted & Gustaf logo to login screen” option, we should be able to see the logo on the login screen if we browse to the site (no manual recompilation required):
And we do! It would seem the install was successful! If we login we’ll also be able to see that we have a British flag instead of the American one for the English language, i.e. the “en” language branch:
Other than that, not much will happen until we start using ETF by inheriting its page type base classes etc. :)
Page Type Builder is required to install ETF
If you haven’t added Page Type Builder to the website the installer will fail saying “Page Type Builder is required, ensure PageTypeBuilder.dll exists in the ‘bin’ folder”:
If you see this error, make sure you copy at least PageTypeBuilder.dll and Castle.Core.dll to the target site’s bin folder (current ETF version is built using Page Type Builder 1.3). If you haven’t downloaded Page Type Builder yet, make sure to download it from Codeplex.
Start using ETF, preferably on a new site
In order to use ETF we need to open the project in Visual Studio and add an assembly reference to TemplateFoundation.dll:
However, since the Alloy Technologies sample site doesn’t use Page Type Builder we’d have to add PTB page type classes and map them to existing page types using each page type’s unique GUID. That’s outside the scope of this post, and generally it’s advisable to start new projects based on ETF instead of adding ETF to existing sites (although it can be done, we have added it to numerous existing projects ourselves).
- EPiServer CMS 6 R1/R2
- Page Type Builder
- IIS 7+ (the XML transformation scripts are for IIS7+ web.config format only)