NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: broche on May 07, 2014, 12:05:51 PM

Title: HTML to include a text file
Post by: broche on May 07, 2014, 12:05:51 PM
Hi, I know there is a way to include a text file using HTML - That way I can have different text files for different customers show on login?

Brian
Title: Re: HTML to include a text file
Post by: Bruce on May 07, 2014, 09:34:48 PM
Use the tag;
<!-- Net:f:filename.htm -->
in your login form (maybe as a Display field).

Note that the snippets should contain "xHTML compliant text" for maximum compatibility.

xHTML basically means that all opening tags, must be explicity closed.
eg <br> is not allowed. Use <br></br> or more compactly <br/>

Cheers
Bruce

Title: Re: HTML to include a text file
Post by: terryd on May 07, 2014, 09:38:35 PM
Hi Brian
This is pretty clunky and wouldn't be too practical for a large number of clients but should work for a small set.
It would obviously only work after login.
In your PageHeaderTag select actions then the XHtml tab
Insert a routine
Routine: name e.g JJoneslogin
condition: p_web.GSV('logincode') = 98  !represents the unique code for the user
or
condition: p_web.GSV('logincode') = 'JJones'  !represents the user's login name
Location: Top
XHTML:

<!-- Net:f:Client/98.txt --> !contains the html that you want to appear

Repeat for each user
I haven't done any testing but I think this should work. There's probably a better way which should popup in this thread
Title: Re: HTML to include a text file
Post by: broche on May 08, 2014, 06:31:25 AM
Thanks to both of you ...