Creating a C# fragment Template Building Block
You can create C# fragments, for executing simple operations on a package, by entering C# code directly into the Source tab of a Template Building Block in the Content Manager Explorer.
Procedure
- Write a C# code fragment.
- Open the Content Manager Explorer.
- In a Folder, select .
- In the Source tab, in the Template Type drop-down menu choose C# Code Fragment.
- Copy and paste your C# code fragment into the source body.
- Save and close the Template Building Block.
Results
What to do next
SDL Tridion Sites offers basic debugging functionality by attempting to compile the C# fragment in context when you save the Template Building Block.