Create a custom child topic view

Although it's possible to create custom templates that show custom views of child topics, this process can be a fair amount of work. Another easier way is to use the system defined function ChildTopicsTableHtml() which can automatically create child topics.

For example, the StoredProcedure header template doesn't have any special formatting that shows child topics which are all the stored procedures in a database. The following expression embedded into the topic performs this task:

<<%=  ChildTopicsTableHtml(oHelp,"DATASTOREDPROC","Procedure",
  "oHelp.FormatHtml(oHelp.oTopic.Body)","oHelp.oTopic.Syntax" )%>>

Make sure you write this as a single line. The output generated by embedding this string looks like this:

The ChildTopicsTableHtml() function takes four parameters:

  1. loHelp
    A reference to the Help Builder object

  2. lcChildTopicTypes
    A comma delimited list of child topic types that are used in the list

  3. lcDisplayExp1
    An expression to be rendered
    This first item is truncated at the first paragraph.

  4. lcDisplayExp2
    Another expression to be rendered below the first
    This expression is rendered on the next line.

The last two parameters are optional - if you leave them out the body topic is rendered.

© West Wind Techologies, 1996-2019 • Updated: 02/07/12
Comment or report problem with topic