[fpc-pascal] fpweb tutorial

ABorka fpc-devel at aborka.com
Tue Jul 13 19:09:28 CEST 2010


/lazarus/components/fpweb/demo/fptemplate/*.*

has examples of how to use templates and template tags.

On 7/13/2010 07:47, Felipe Monteiro de Carvalho wrote:
> 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.
>




More information about the fpc-pascal mailing list