plainblack.com
Username Password
search
Bookmark and Share
Subscribe

How To Enable Other Template Engines

If HTML::Template just doesn't cut it, WebGUI allows you to enable other template engines, like HTML::Template::Expr and Template Toolkit.

First, make sure you install your template engine from cpan. Make sure you are root so that the library is installed for all users.

	# cpan
cpan> install HTML::Template::Expr

Next, to enable the template engine in WebGUI, you need to alter your configuration file to replace the existing "templateParsers" key with the following:

	"templateParsers" : [
"WebGUI::Asset::Template::HTMLTemplate",
"WebGUI::Asset::Template::HTMLTemplateExpr"
],

Now, restart your WebGUI and try to add a new tempate to the system. In the Properties tab under Template Engine, you should be able to select your newly-enabled template engine.

Keywords: engine howto Templates

0jigou: "If you enable HTMLTemplateExpr for your template processor, be sure to change the WebGUI-required TMPL_VAR tags in your template (head.tags, body.content) and replace the dots with underscores (head_tags, body_content)"
Search | Most Popular | Recent Changes | Wiki Home
© 2018 Plain Black Corporation | All Rights Reserved