Subscribe to RSS Feed

Templating Engine

This is my templating engine for .NET solutions. It was inspired by the syntax and techniques from the django templating language but built from scratch in C# to create a similar templating solution. Depending on the platform you use for developing web sites there are some very good templating engines out there. I’ve built this one mainly as a learning experience.

Below is 10 minute screen cast demo of me showing how to use the templating to create a simple web page. It shows the basics but for a more detailed view of what the assembly can do take a look at the documentation.


Free online screencasting tool

The templating engine allows you to manage the display of data within separate files. This promotes better separation between data access and data display. It also provides an easy way to re-use code by using base templates that contain the bulk of information and then smaller templates that extend the base templates and override the various sections that they need to control.

The syntax for the templating contains if & else statements, for loops, variable display and many variable filters. The filters allow you to modify variables in certain ways e.g. the linebreaks filter will take a normal string and insure that it displays correctly in HTML by adding <p> and <br /> tags.

Whether you already know about templating solutions or you know nothing but are intrigued then the best way to find out how useful templating can be is to download the demo from this page and have a go.

Read the documentation
Download the demo & dll (visual studio 2005)
Visit code page at Google Code

Leave a Reply