NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: terryd on February 08, 2010, 11:24:59 PM
-
I have created a generic webserver which I am deploying to (currently) 3 users. I would like to find out if the following are possible:
1. On my Index page the page title is a constant (e.g. 'CourierA') This obviously is the title that appears on the tab of the browser. I would like to make this a variable.
Question. Can I. If so how?
2. The location of my web folder can vary (e.g. 'web' or 'C:\user\files') dependant on the user. I can't insist that the users change.
Question Can I use a variable in the NetTalk or NetSimple Object extension in my Webserver procedure and if so where would I prime it? I see there is an Override Server Settings embed point which is a start.
If I can't sort out the above then I have to maintain 3 versions of the same application which is just not clarionlike ;-)
-
Hi Mike, If I'm reading your post right:
1. Just put in a local data (variable), like loc:pagetitle, instead of constant text.
2. You can change the location to anything you want, SO LONG AS it is a folder above your executable, and in the web (or whatever directory you specify). Your users cannot get to a folder underneath the one you specify as your web folder.
That said, I am not entirely sure I've read correctly, what you really are trying to accomplish. Please elaborate if I didn't catch on to what you want to do.
-
For anyone who is interested.
1. is sorted. Create a table with a field which stores the location of the web folder. Open the file in the Webserver procedure, read the record after opening the file and in the Override default server settings embed type in s_web._SitesQueue.Defaults.WebFolderPath = CLIP(fieldnameofweblocation). Close the table.
2. is a problem The header routine is
Header Routine
packet = p_web.w3Header()
! Start of "W3 Header Override"
! [Priority 5000]
! End of "W3 Header Override"
packet = clip(packet) & '<head>'&|
'<title>'&clip('Jedidja Couriers')&'</title>'&|
'<meta http-equiv="Content-Type" content="text/html; charset='&clip(p_web.site.HtmlCharset)&'" /><13,10>'
packet = clip(packet) & p_web.IncludeStyles()
packet = clip(packet) & p_web.IncludeScripts()
packet = clip(packet) & '</head><13,10>'
p_web.ParseHTML(packet,1,0,Net:SendHeader+Net:DontCache)
packet = ''
which doesn't seem to allow the changing of the title. I hope I am wrong. Can anyone comment?
-
Mike
Thanks for the reply. I was putting in my comment at the same time as you replied. My problem with the second issue is that if I call the page name on my index page 'terry' for example then that is the name that appears on the web browser. If however I am another client using the webserver I want 'Mike' to appear as the name.
-
Store your page title in a SSV and then display using this Tag instead of text.
<!-- Net:s:SessionVariable -->
see docs for more info
-
Thanks Kevin, or as we say in South Africa, Baie dankie