Home

Awesome

The DVD Chief template engine used in generation of movie and person template and html export. The template engine has most features of Smarty PHP template engine.

Source: http://dvdchief.com/delphi

Compilers

Tested with RAD XE2, RAD 10.3 and FPC 3.3.1.

This repo contains some modifications to the original sources:

Changed

Added

  Namesp.SetVariable('Bands',
    Arr([
      Map([
        Item('Name', 'Manowar'),
        Item('Year', 1980),
        Item('Genre', ['Heavy metal', 'Epic metal']),
        Item('Lineup',
          [
            Map([
              Item('Name', 'Eric Adams'),
              Item('Instrument', 'Vocals')
            ]),
            Map([
              Item('Name', 'Joey DeMaio'),
              Item('Instrument', 'Bass')
            ]),
            ...
          ])
        )
      ]),
      ...
    ])
  );
  TimeSeparator := ':';
  ShortTimeFormat := 'hh:nn';
  LongTimeFormat := 'hh:nn:ss';
  DateSeparator := '.';
  ShortDateFormat := 'dd/MM/yyyy';
  LongDateFormat := 'dd/MM/yyyy HH:mm:ss';
  DecimalSeparator := '.';

Status

I'm not going to develop this code actively since I'm not using it much and everything I needed is done already. But PRs are welcome as well as any tests!

Contributions

If you find this project useful, you can help by adding tests. Test fixtures are located in Test\TestCases.lst, format is described at the beginning of the file. Many modifiers and functions are waiting to be covered.

License

Initial license is dual GPL / MPL 1.0, as mentioned in TemplateEngine.pas, now GPL / MPL 2.0.