wwHelp::RenderTopic

Renders the currently active topic using the current cHTMLTemplate (see wwHelp::SetTemplate). The topic is rendered into a string which typically will be HTML, but maybe a macro string to feed to Word or like Word processor.

Use RenderTopic to embed HTML help topics directly in your applications using the WebBrowser control.

wwHelp::RenderTopic(lcTopicPK)

Return Value

Output string from the merged HTML template. Note Render Topic always 'executes' the current topic script creating HTML output in response.

Parameters

lcTopicPK
Optional - a PK for a topic to render. By default the currently active topic is rendered. Use a blank string if optoinal parameters are not supported in your COM environment.

Remarks

You should call SetTemplate() before calling this method to make sure the appropriate template is set.

Note that the HTML is relative to the Help Builder project directory so if you render the HTML for display you should render it from a file in that directory so images can be found. If you want to have the content displayed in a browser window or Web Browser control you can use the Preview() method to perform this task for you.

Example

o=CREATE("wwHelp.wwhelp")
o.Open("c:\temp\wchelp\wchelp.hbp",.t.)
o.LoadTopic("Class wwIPStuff",1)

*** Load the default template for this topic
o.SetTemplate()

?  o.RenderTopic()   && ShowHTML( o.RenderTopic)

Overloads:


See also:

Class wwHelp | wwHelp::Preview

© West Wind Techologies, 2018 • Updated: 04/13/05
Comment or report problem with topic