NetTalk Central

Author Topic: Context sensitive help - getting Page Title  (Read 3722 times)

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Context sensitive help - getting Page Title
« 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

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Context sensitive help - getting Page Title
« Reply #1 on: September 22, 2013, 03:22:09 AM »
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
« Last Edit: September 22, 2013, 04:58:17 AM by peterH »

Johan de Klerk

  • Full Member
  • ***
  • Posts: 217
  • Johan de Klerk
    • View Profile
    • Designer Software
Re: Context sensitive help - getting Page Title
« Reply #2 on: September 22, 2013, 08:02:59 AM »
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
Clarion 10, NT 11.57

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Context sensitive help - getting Page Title
« Reply #3 on: September 22, 2013, 11:43:06 PM »
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

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Re: Context sensitive help - getting Page Title
« Reply #4 on: September 23, 2013, 12:26:43 PM »
Thanks so much, Peter and Johan

The advice and link will undoubtedly save many hours of work.