libhtmlTemplate

libhtmlTemplate, is a library to aid developers to separate content from code.
Download

libhtmlTemplate Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Rui Barreiros
  • Publisher web site:
  • http://www.evoluta.pt/~rbarreiros/libhtmlTemplate/

libhtmlTemplate Tags


libhtmlTemplate Description

libhtmlTemplate, is a library to aid developers to separate content from code. libhtmlTemplate, is a library to aid developers to separate content from code. libhtmlTemplate is very simple, small and easy to use, it's my first c project, so any feedback with the purpose of helping to improve the library is welcome as well as any bug report and feature request, ill be glad to help in what i can, and knowExamples:#include < htmlTemplate.h >int main(int argc, char **argv) { // There are three ways of instatiating a Template object // This is the generic one Template t; // This one, predefines on instatiation the default path where the templates are Template t_w_path("/var/www/html/templates"); // This one, predefines the path, and the template file Template t_w_file_path("/var/www/html/template", "index.tpt"); // When you instatiate the template object as the generic one, // the dir and file are the default './' and 'index.tpt' so // if you want to change them, you must use the following methods // Set the template dir t.setDir("/var/www/mytemplatedir"); // Set the template file t.setTemplate("mytemplate.tpt"); // Now you are ready to replace the predefined template values, with the ones you want // Suppose you have a tag in the template, {{MYVALUE}} // to place your value in his location just use addText(), notice the absense of {{ & }} t.addText("MYVALUE", "This is my text"); // Now you can automatically display the result by calling playTemplate cout


libhtmlTemplate Related Software