C++ HTML template framework, templatizing library, HTML generator library

Marcin Gil picture Marcin Gil · Dec 10, 2008 · Viewed 40.2k times · Source

I am looking for template/generator libraries for C++ that are similar to eg. Ruby's Erb, Haml, PHP's Smarty, etc.

It would be great if I it would sport some basic features like loops, if/else, int conversion to strings, etc.

Parameter passing to template rendering engine is also important if I could pass all of them in a hash map instead of calling some function for each of parameters.

Do you have any recommendations?

I can see also the possibility of embedding languages like Lua, however I haven't found a templatizing library for that either.

Answer

Marcin Gil picture Marcin Gil · Jan 5, 2009

A quick review of the mentioned project.

http://rgrz.tumblr.com/post/13808947359/review-of-html-template-engines-in-c-language

ClearSilver

Teng

Templatizer

  • Site: http://www.lazarusid.com/libtemplate.shtml
  • Project: download only
  • Group: none
  • License: free to use
  • Language: C (low level)/C++ (interface) mixed
  • Last Update: unknown
  • Last Release: unknown
  • Document: none
  • Community: none

HTML Template C++

ctpp

  • Site: http://ctpp.havoc.ru/en/
  • Project: download only
  • Group: none
  • License: BSD License
  • Language: C++ with C API
  • Last Update: Oct 5, 2011
  • Last Release: Version 2.7.2 on Oct 5, 2011
  • Document: Rich
  • Community: none

Wt

Flate

  • Site: http://flate.dead-inside.org/
  • Project: none
  • Group: none
  • License: LGPL v2.1
  • Language: C
  • Last Update: Sep 4, 2010
  • Last Release: 2.0 on Sep 4, 2010
  • Document: Poor
  • Community: none

Jinja2C++