NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: CaseyR on September 19, 2013, 01:50:03 PM
-
I would like to provide context sensitive help pages to my users. Help and Manual does a nice job of providing individual help topics in HTML. A button in the body of each relevant page would work, but that is pretty clunky. Is there a way to retrieve the Page Title so it can be part of a URL for a button in the page header or as a menu item? Other suggestions for context sensitive help would be greatly appreciated.
Thanks
-
Hi Casey,
I don't know about the page title, but you can actually get the page name which may be just as good (depending, of course, on your naming standards).
p_web.pagename holds the name of the actual page being served. I think it gets set in the web handler proc based on the file name but I'm not 100% sure of this. Anyway, a little experimenting shows that it's available in the Procedure Setup embed in NetWebBrowses and NetWebForms. I've also found that it get changed to the name of the browse proc upon clicking cancel on a form so you should save it to some local var in Procedure Setup. Also, if you've got a browse on a (wrapper) form p_web.pagename will hold the name of the browse, not the form.
I'm actually looking into this myself as I'm in the process of adding help to a fairly large app. What I do is create a routine in every proc. It's always called Help and it just displays a clickable image with an url to the relevant H&M page - so we're on the same line here.
What I want to do next is to see if I can write a small template to add the routine for me. Ultimately a global template that'll generate the routine into all browses and forms would be nice - but we'll see how far we can take it.
If anyone out there (Bruce included!) has some good ideas, don't hold back.
Added: As it turns out there's no problem in generating a routine into a NetWebxxx procedure. But it appears there's more to it than just that. The challenge is to have the routine be picked up by %htmls - and that leaves me in the dark. At least for now. So maybe this whole thing should be turned into a feature request ...
Peter
-
Hi Casey/Peter,
Maybe this can help you.
http://www.nettalkcentral.com/index.php?option=com_remository&Itemid=27&func=fileinfo&id=4
Regards
Johan de Klerk
-
Hi Johan,
Thank you for pointing me to the downloads section, I never actually explored that.
And thank you for the link. That's pretty much what I've done so far, but I would like to take it a bit further if I can.
Peter
-
Thanks so much, Peter and Johan
The advice and link will undoubtedly save many hours of work.