How to make a Delphi Intraweb IWFrames work with IWTemplateProcessorHTML?

94 views Asked by At

I'm using Delphi 11.3 with IW15.

I have multiple iwframes, using them as a body of my page beside a header and a footer. everything is working great until I decided to use IWTemplateProcessorHTML.

enter image description here

My problem is that each iwframe has a IWFrameRegion which cannot be renamed for some reasons (I don't know why), although I tried to rename it various ways however it's not renamable! for that it's impossible to apply a template for each iwframe because it will have the same file name IWFrameRegion.html therefor it will work only for one iwframe only!

Another try was by adding another IWRegion and then easily rename it after that applying the IWTemplateProcessorHTML on it but in the end, it renders nothing! (empty page).

hence, this is how I call the iwframe to display it inside the body region:

   if frm1 = nil then
     begin
       frm1 := TIWFrame2.Create(self);
       frm1.Parent := IWRegion1;
       frm1.Visible := true;
    end;

So how to solve this issue? is my approach wrong? or there is another way to apply IWTemplateProcessorHTML to an iwframe? or best if maybe there is a way to rename IWFrameRegion ?

1

There are 1 answers

0
Dreamer64 On

enter image description here

I Found that I have to add the html file needed to custom the style in that section of the IWTemplateProcessorHTML marked in the image of the Object Inspector. Then hook it to IWFrameRegion -> [layoutMgr] and it will work!!