NetTalk Central

Author Topic: Embed HTML File  (Read 2935 times)

gavinwebb

  • Newbie
  • *
  • Posts: 40
    • View Profile
    • Email
Embed HTML File
« on: February 01, 2012, 01:32:17 AM »
Sorry, this must be a stupid question!
On my index page I want to embed an external HTML file to contain the main body of my home page e.g. the blurb about the app.

I currently have this:  - Ideally I want to take the HTML between the header and footer tags and put it into a separate HTML file, but how do I tell it to include it here?

<!-- Net:PageHeaderTag -->
<br />
<div id="wrapper">
<div id="middlesection">Text for the middle</div>
<div id="leftsection">Text for the left</div>
<div id="rightsection">Text for the right</div>
</div>
<!-- Net:PageFooterTag -->

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Embed HTML File
« Reply #1 on: February 01, 2012, 02:01:05 AM »
maybe

<!-- Net:PageHeaderTag -->
<!-- Net:f:client/MyBody.txt -->
<!-- Net:PageFooterTag -->
where MyBody.txt is the HTML code that you want to insert
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

gavinwebb

  • Newbie
  • *
  • Posts: 40
    • View Profile
    • Email
Re: Embed HTML File
« Reply #2 on: February 01, 2012, 02:09:38 AM »
hmmm....maybe, does the "client" bit suggest the file will be on the client?
I anticipated this would be a .html file somewhere in the web folder on the server?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Embed HTML File
« Reply #3 on: February 01, 2012, 03:45:06 AM »
no, Terry had assumed you made a folder called "client" in your web folder, and put the MyBody.Txt in there.

you could just as easily make myBody.txt in the web folder, then the include tag becomes
<!-- Net:f:mybody.txt -->

The f: part of the tag tells it the next bit is a filename, and to include that file in this place.

Obviously you could be a lot more creative, so that "different clients" see different .txt files - that's where Terry had jumped ahead to.

cheers
Bruce