Creating a .NET assembly Template Building Block
In Compound Templating, you can create a Template Building Block and add a .NET assembly to it.
Procedure
- Create a .NET project in your .NET development environment, for example Visual Studio.
- Add references to the SDL Tridion Sites .NET assemblies that your .NET assembly needs to communicate with—for more information, see Adding references to assemblies from Visual Studio.
- Set up your .NET templating client machine so that it can upload the compiled assembly to Content Manager—for more information, see Uploading .NET assemblies to the Content Manager.
- Write code to transform the package being offered to this Template Building Block into a package to offer to the next Template Building Block.
Writing such code typically involves coding against the .NET Tridion Object Model, TOM.NET, and so this information is described partly here, and partly in the TOM.NET API reference documentation.
To be used in a Template Building Block, the assembly must contain at least one class that implements
ITemplate(refer to the TOM.NET API reference documentation for details). - When you have created a .NET assembly and added it to a Template Building Block, debug the Template Building Block as part of debugging a Compound Template of which it is a part—for more information, see Debugging a Template Building Block.