Content Insertion

Content Insertion is available from the Insert Content submenu of the Edit menu or from the Insert Content toolbar button.

The Insert Content command displays a submenu with 11 commands designed to help you write templates more quickly:

Edit > Insert Content > Code Block

The Code Block command inserts <%  %> markers to hold code to be executed by CodeSmith.

Edit > Insert Content > Inverted Code Block

The Inverted Code Block command inserts %>  <% markers. This is useful when you need to insert literal output in the middle of an existing code block.

Edit > Insert Content > Write Block

The Write Block command inserts <%=  %> markers to write the value of a property to the template output.

Edit > Insert Content > Script Block

The Script Block command inserts an empty script block:

<script runat="template">
</script>
Edit > Insert Content > Comment Block

The Comment Block command adds <%-  -%> markers around the current selection to turn it into a comment.

Edit > Insert Content > Code Template Directive

The Code Template Directive command inserts an empty CodeTemplate directive.

Edit > Insert Content > Property Directive

The Property Directive command inserts an empty Property directive.

Edit > Insert Content > Import Directive

The Import Directive command inserts an empty Import directive

Edit > Insert Content > Assembly Directive

The Assembly Directive command inserts an empty Assembly directive.

Edit > Insert Content > XmlProperty Directive

The XmlProperty Directive command inserts an empty XmlProperty directive.

Edit > Insert Content > Register Directive

The Register Directive command inserts an empty Register directive.

This feature is only available in the Professional Edition of CodeSmith.