[fpc-pascal] fpweb tutorial

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Tue Jul 13 16:47:29 CEST 2010


Hello,

Thanks, with this blog I seam to be going somewhere and it worked ok
with fpc 2.4.0 and the weblaz.lpk package.

One thing still: Is there support for templates?

I am doing something like this to load my page:

procedure TFPWebModule1.DataModuleRequest(Sender: TObject; ARequest: TRequest;
  AResponse: TResponse; var Handled: Boolean);
begin
  AResponse.ContentType := 'text/html;charset=utf-8';
  AResponse.Contents.LoadFromFile(ExtractFilePath(ParamStr(0)) +
'mainpage.html');
  Handled := True;
end;

Something like powutils templates would be extremely handy ... all
that html mixed with pascal doesn't look very nice.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-pascal mailing list