Prev Next

An Example With Multiple Input Files and Sections

contents, childtable, children
The $contents, $childtable, and children commands can be used to specify input files. All of the sections in these files are children of the current section and are siblings of each other (see the drop down menu labeled start_multiple at the top of this web page).

Execute The Following Steps

multiple_example_1.omh
Use an editor of your choice to create the file multiple_example_1.omh in the test directory with the following contents:
     
$begin
multiple_example_1$$
     $section An Example With a Child$$
     
     $contents/
     	multiple_example_3.omh/$$
     
     
     $end
Note that you can copy and paste the commands above to your editor window. You may just copy the file with the same name from the getting started directory .

multiple_example_2.omh
Use an editor of your choice to create the file multiple_example_2.omh in the test directory with the following contents:
     
$begin
multiple_example_2$$
     $section Example With no Children$$
     $end


multiple_example_3.omh
Use an editor of your choice to create the file multiple_example_3.omh in the test directory with the following contents:
     
$begin
ChildTwoExample$$
     $section Second Example Child Section$$
     $end


Example In This Web Site Context
You can view the result of making multiple_example_1.omh part of the OMhelp help web site by selecting multiple_example_1 .

Execute OMhelp
In a command window and in the htm directory execute the following command
 
     omhelp ../multiple_example_1.omh -noframe

Example by Itself
Use a web browser of your choosing to view the file test/htm/multiple_example_1.htm .

Discussion
The file multiple_example_1.omh contains the root section for this example. There is more than one section in the corresponding web site because the root section contains a contents command. For this reason, a navigation links are included in the web page and the following navigation sections are automatically generated: _contents , _reference , _index , _search , _external .
Input File: getstarted/start_multiple.omh