Common classes, methods and properties for templating
When you create a C# fragment or a .NET assembly to use as a Template Building Block, you have access to a number of classes, methods and properties. This section deals with the most commonly used of these API items.
In your C# fragment or .NET class, the following variables are available:
- The package (variable
packageof typePackage) variable gives access to the contents of the package being processed by the current Template. - The templating Engine (variable
engineof typeEngine) variable gives access to the Content Manager and the items in it. - The templating Logger (variable
logof typeTemplatingLogger) variable gives access to the templating log and lets you write messages to it. These messages appear in Template Builder when you execute a Template.
There are also Utility classes that you can use directly when writing your own template.