Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ServerInternalFiles Access Location
#4
Updating with some conversation on this subject, lifted from Telegram (originators can clarify or updated as needed):

Eddy
very simple fast question: how do I overwrite the VTemplate: TStream inside

procedure TForm1.IWTemplateProcessorHTMLMainBeforeProcess(var VTemplate:
TStream);

Alex:
Load your template to TMemoryStream instances (1 for each template file) do whatever you want with them and add them to the ServerInternalFiles list. Use them from there instead of loading/processing it every time.
Then just use the BeforeProcess event to use your own stream. This way IW won't load it from file

but if you are following this, use the ServerController.OnConfig event

if you need to do some processment which is dependent on the request, then you need to do the processment using the BeforeProcess event anyway. You can still use the serverInternalFile to avoid having to load the template from file every time
Reply


Messages In This Thread
ServerInternalFiles Access Location - by joel - 08-02-2018, 12:07 PM
RE: ServerInternalFiles Access Location - by joel - 08-21-2018, 01:40 AM
RE: ServerInternalFiles Access Location - by DanBarclay - 08-13-2019, 02:23 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)