NetTalk Central

Author Topic: HOW TO: insert external files on start/end of <HEAD>, <BODY>, ...  (Read 2714 times)

patrick de laet

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • ShopPlus
    • Email
I have a lot of webpages, generated with a 3rd party product (Artisteer).
In the content area, I can add <!-- Net:f:xxxx.txt --> statements and they are generated by Artisteer in the resulting webpages.
That's OK.
But i'd like to insert extra <LINK>, <SCRIPT>, ... statements at the beginning and end of every <HEAD>, <BODY>, . . . in every webpage.
In which embed can I do that?

PS: I'm only using NetWebSource procedures (no NetWebPage, NetWebBrowse, ...)

I'd like to do it once for all my webpages, in the WebServer procedure.

regards

Patrick De Laet

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: HOW TO: insert external files on start/end of <HEAD>, <BODY>, ...
« Reply #1 on: June 10, 2011, 09:30:18 PM »
So, the first thing to note is that you don't really want to do this for all requests. For example it wouldn't go into CSS, js, png, zip.files etc.

So really the request is to parse all htm files.
There is a mechanism for parsing HTML, using the <!-- net:tags done by the ParseHtml method.

It sounds to me like you'd want to override the parsehtml method a bit (in webhandler) to add the functionality you need.

Cheers
Bruce