Setup template engines

From Kooboo document
Jump to: navigation, search

Kooboo CMS supports three types of template engine build-in: Razor, WebForm, nVelocity.

Razor and WebForm engine include the Kooboo CMS installation package defaultly. nVelocity is not supported while running on medium trust level. So you will have to setup the nVelocity manually if you want to use it while running on medium trust level.

Once the engines are setup in Kooboo CMS, you can create the corresponding type of layout/view under the Create New menu:

Template engines.PNG

Setup template engines

All the supported engines are included in file Template_Engines.zip. Download it.

How to set up different template engines?

Razor

  • Copy Kooboo.CMS.Sites.TemplateEngines.Razor.dll into BIN folder of Kooboo CMS.

WebForm

  • Copy Kooboo.CMS.Sites.TemplateEngines.WebForm.dll into BIN folder of Kooboo CMS.

NVelocity

  • Copy Kooboo.CMS.Sites.TemplateEngines.NVelocity.dll into BIN folder of Kooboo CMS.

Usage

Every template engine has its template syntax. Kooboo CMS provides the Code helper at the right side of template editor to help users to easily use the API.

For Razor and Webform, you can also edit the template in the Visual Studio. You will get the intellisense feature in Visual Studio. Kooboo CMS can be easily combined with Visual Studio by opening the Kooboo CMS as "Web Site" using Visual Studio.

Template engine VS.PNG