Documentation Center

Configuring the default Template Building Blocks loaded

You can control which default templates you want to load by editing one or more configuration files.

About this task

The various default Template Building Blocks shipped with SDL Web are registered in the defaultTemplatesScripts section of the Tridion.ContentManager.config configuration file, which is by default in%TRIDION_HOME%\config\.

Each <defaultTemplatesScript> element in this section has a scriptFile attribute which points to the XML setup script for a part of SDL Web:

  • SetupDefaultTemplates.xml contains default items for the core
  • SetupOutboundEmailTemplates.xml contains default items for Outbound E-mail (only present if this feature was installed)
  • SetupSiteEdit2012Templates.xml conbtain default items for Experience Manager (only present if this feature was installed)

Each of these files is based on the %TRIDION_HOME%\schemas\SetupTemplates.xsd schema file, and defines XML instructions for loading default Template Building Blocks.

Procedure

  1. Open the SetupDefaultTemplates.xml file in a text editor.
  2. In the <templates> section, remove or comment out the <cSharpTemplate>, <dreamweaverTemplate>, <xsltTemplate> and <compoundTemplate> items you do not want to load automatically, for example:
    ...
    <cSharpTemplate wrapperForTemplate="Activate Tracking"/>
    <cSharpTemplate wrapperForTemplate="Cleanup Template"/>
    <cSharpTemplate wrapperForTemplate="Component Query" />
    <cSharpTemplate wrapperForTemplate="Convert Html to Xml" />
    <cSharpTemplate wrapperForTemplate="Convert Xml to Html" />
    <cSharpTemplate wrapperForTemplate="Extract Binaries from Html" />
    <cSharpTemplate wrapperForTemplate="Extract Components from Page" />
    <cSharpTemplate wrapperForTemplate="Image Resizer" />
    <cSharpTemplate wrapperForTemplate="Link Resolver" />
    <cSharpTemplate wrapperForTemplate="Publish Binaries in Package" />
    <!--cSharpTemplate wrapperForTemplate="SiteEdit 1.3 Template" /-->
    <!--cSharpTemplate wrapperForTemplate="Target Group Personalization"/-->
    ...
  3. Save and close the file.
  4. Open SetupOutboundEmailTemplates.xml (if using) in a text editor.

    In the <templates> section, an <assemblyTemplate> is specified which loads cSharpTemplates for every ITemplate implementation in the assembly.

  5. If you only want to load some of the cSharpTemplates available in the <assemblyTemplate>, add a <cSharpTemplate> element for every template in the assembly you want to load. For example:
    <?xml version="1.0" encoding="utf-8" ?>
    <setup folderTitle="Outbound E-mail">
    	<templates>     
    		<assemblyTemplate id="Templates" assemblyPath="..\bin\Tridion.OutboundEmail.Templating.Templates.dll"/>
    		<cSharpTemplate wrapperForTemplate="Only load this template" assemblyTemplateRefId="Templates"/>
    	</templates>
    </setup>

    The following logic is applied when loading templates in a .NET assembly if you specify an AssemblyTemplate or cSharpTemplates or a combination of both:

    • If you only specify an AssemblyTemplate, then cSharpTemplates are created for every ITemplate implementation in that assembly.
    • If you specify both AssemblyTemplate and one or more cSharpTemplate elements, only the specified cSharpTemplates are created.
  6. Save and close the file.
  7. Open SetupSiteEdit2012Templates.xml (if using) in a text editor, and make the same types of changes as in SetupOutboundEmailTemplates.xml, as needed, and then save and close the file.