|
|
|
| acTextTemplateConverter component.
|
| function ConvertToFile(const Template, FileName: String): Boolean;
|
| The ConvertToFile converts the text Template (translates all keywords specified in Params property) and saves the converted template to the file specified FileName parameter.
|
| procedure TForm1.Button1Click(Sender: TObject);
|
| var
|
| I: Integer;
|
| begin
|
| if acStringListContainer1.Count <> 0 then
|
| for I := 0 to acStringListContainer1.Count - 1 do
|
| begin
|
| acTemplateConverter1.ParamByName('%product_name%').Value := acStringListContainer1.Values[I];
|
| acTemplateConverter1.ParamByName('%product_id%').Value := acStringListContainer1.Names[I];
|
| acTemplateConverter1.ConvertToFile(TemplateMemo.Lines.Text,
|
| 'output\' + acStringListContainer1.Names[I] + '.html');
|
| end;
|
| end;
|
| Params property;
|
| Convert, ConvertStrings and ConvertStream methods.
|