Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Intraweb 14.2.7 duplicate head section of my html template
#1
Hello

In a Delphi Intraweb application I use a TIWTemplateProcessorHTML with a html template as a workframe, but at runtime, the head section of my html is duplicated, hence runtime issues.
I've uploaded the html page created by Chrome.

What do I do wrong? Any ideea?
Reply
#2
Are you using master templates? Most of the times this is caused by issues on the html used as template... so I'd have to check your template do know
Reply
#3
Yes, I use master templates and in all of them the head is duplicated. I've attach the template below and the code generated by Chrome at runtime.


Attached Files
.html   webMainForm.html (Size: 6.49 KB / Downloads: 4)
.html   view-source_127.0.0.1_8899_$_.html (Size: 9.5 KB / Downloads: 3)
Reply
#4
Hi, read this: http://docs.atozed.com/docs.dll/developm...lates.html
You need a $body tag in your MASTER, ex:
Code:
<body>
  <div class="div-body">$body
  </div>
  <div class="div-footer">
    (C) Atozed Software Ltd.
  </div>
</body>
Reply
#5
I've put it and now it duplicates the body too; the head remains duplicated.
I've attached both files.


Attached Files
.html   view-source_127.0.0.1_8899_$_.html (Size: 14.5 KB / Downloads: 0)
.html   webMainForm.html (Size: 6.53 KB / Downloads: 2)
Reply
#6
Hi, i think you don't understand how IW works when using MasterTemplates. I rewrite your page. In your ServerController -> MasterTemplate := 'MASTER.html';


Attached Files
.html   MASTER.html (Size: 1.55 KB / Downloads: 8)
.html   webMainForm.html (Size: 5.01 KB / Downloads: 11)
Reply
#7
Thank you a lot.
You were right.
It works now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)