Page Definition Lines

The page definition lines include references to the source files and define various aspects of the output.

The source files include:

Input Description
Primary Content Block The primary content block is inserted into the template based on the location of the <--##CONTENT_1##--> tag.
Secondary Content Block The secondary content block is inserted into the template based on the location of the <--##CONTENT_2##--> tag. This input is optional.
JavaScript A reference to a JavaScript file is inserted into the template based on the location of the <--##JAVASCRIPT##--> tag and is merged into one or more of the above files. This input is optional.
Image An image can be included in the menu and Table of Contents. This input is optional.

Typically, the following output will be generated:

Output Description
View file A separate HTML file for each page (marked for viewing), for viewing online.
Print file A single HTML file including all pages (marked for printing), for printing.
View_print file A single HTML file including only the pages defined to be viewed, for reviewing as a single HTML page or printing.
Navigation Menu The navigation menu is inserted into the template based on the location of the <!--##MENU##--> tag and is merged into one or more of the above files.

There are numerous control techniques that can be applied within the page definition lines to define exactly what output is created. The details are provided below.

Page Definition Line Syntax:

Qualifier*,Page_Title,Output,Primary_Content,JavaScript,Secondary_Content,Menu_TOC_Image

Where (items in bold are required, all other items can be omitted):

Page Definition Element Description
* Menu level. Use one * for the top level, two ** for the next level, and so on. Levels can only increase one at a time from one line to the next (1 to 2, 2 to 3, etc.), but can decrease any amount (3 to 2, 3 to 1, 4 to 2, etc.)
Qualifier Qualifiers are optional and define special processing. They are included before the menu level.
  • v == include in view only
  • p == include in print only
  • x == do not include in view
  • q == do not include in print
  • ^ == generate output, but do not include in menu or print (* is not required)
  • % == force a page break. Must come before * and cannot be used with i or s
  • a, b, c, d or e == conditionally excludible page. Included by default unless explicitly excluded using the EXCLUDED_PAGES command. Cannot be used with i or s.
  • ? == conditionally includible page, where ? is a single character or digit. Not included by default unless explicitly included using the INCLUDED_PAGES command. ? cannot be one of the defined qualifiers and must come before v, p, x or q and cannot be used with i or s
  • i == special conditional page for instructor note pages, not included in the document's menu. Must come before v, p, x or q. This page can be excluded for creating a student manual.
  • s == special conditional page for student note pages, not included in the document's menu. Must come before v, p, x or q. This page can be excluded for creating an instructor's manual.

Do NOT include a comma between the qualifier and the menu level.

Page_Title The page title is used as the text for the menu and the title of the page (displayed on the browser tab). Typically, this will also be the page heading in the primary content block. The menu may have limited space, so the page title might have to be shortened or abbreviated, but the page heading can be as long as you want.
Output The file name of the output file. Output is generated by combining the content blocks and other parameters with the template.

Typically, Output is omitted and the output name is automatically generated based on the name of the Primary Content Block. If the file extension of the Primary Content Block is ".htm" an "l" will be appended, so the extension of the output file will become ".html"

If Output is included, it is used as the name of the output file.

"NUL" is special case that does not generate output. This can be used to create menu and table of contents entries and links to a file that already exists (such as an HTML file from another document or a PDF or other file type not created by DynaDoc). When using NUL, the page to access is entered as the input file.

"[%]" in the output will force the page to open in a new browser tab when accessed from the menu or table of contents. It can be used in all cases: with no output specified, with an output name specified, and with "NUL." The new tab will not be used in the previous and next links.

Primary_Content The file name of the primary content block - usually an HTML file using ".htm". If there is no path included in the name of the primary content block, the path is assumed to be the local "htm" folder. Otherwise the path is used to locate the file. The following actions take place for each page definition line:
  • A menu entry is created (unless the "$" qualifier is used)
  • The contents of the Primary_Content file are inserted into the template replacing the <!--##CONTENT1##--> tag
  • Based on the information below, output may or may not be created:
    • An output file is created for the view version (unless the "x" or "p" qualifier is used)
    • Output is added to the print file for the printed version (unless the "v" or "q" qualifier is used)
    • Output is added to the view_print file for the printed version (unless the "x" or "p" qualifier is used)
    • No output is created if the Output name is "NUL"

"NUL" as the Primary_Content is special case that creates an entry in the menu and Table of Contents, but does not link these entries to any page. No output file is generated.

If the Primary_content file does not exist, DynaDoc will attempt to create it and add the Page_Title as a heading.

If a path is included for the Primary_Content, the path will be passed on to the Output file, which is typically not desired. Specifying the Output file is recommended in this case.

JavaScript_Block The file name of a JavaScript file. A reference is created to this file and is inserted into the template at the <!--##JAVASCRIPT##--> tag.
Secondary_Content The file name of the secondary content block. Usually an HTML file using ".htm". The contents of the file are inserted into the template at the <!--##CONTENT2##--> tag.
Menu_TOC_Image The file name of an image to be used in the menu and Table of Contents for this page.

If an optional item is omitted, its place must be preserved by using commas. Example page definition line with elements omitted:

    *,Page Title,,page_content.htm,,,

Shortcut Page Definition Lines

Most DynaDoc lines usually only include the Level, Page_Title and Primary_Content as shown in the above line. In order to make it easier to create a document, DynaDoc supports Shortcut Page Definition Lines. A Shortcut line only needs to include the Level and Page_Title, such as:

    *,Page Title

DynaDoc will create the primary content file name from the Page Title by converting text to lower case, replacing spaces (" ") with underscores ("_") and appending .htm. For example, the above line will be interpreted as if it was entered as follows:

    *,Page_Title,,page_title.htm,,,

Optionally, an additional comma may be added to the shortcut line to indicate that a sidebar content file is desired.

    *,Page Title,

In this case, DynaDoc will create the sidebar file name using the above name generation method and adding _sb to the file name resulting in this interpretation:

    *,Page_Title,,page_title.htm,,page_title_sb.htm,

Shortcut lines allow you to create a document structure quickly, and as noted above, DynaDoc will create the content files if they do not exist.

The script is not updated to include the full input specification, but this is not necessary because the shortcut line will be processed correctly each time the script is processed.

For shortcut lines, Page Titles cannot include characters that are not valid in file names.


VideoRay Documentation Only

[ Help us improve this document ]

DynaDoc Operator's Manual, Version: 1.00.00
Copyright © 2017, VideoRay LLC - The Global Leader in Micro-ROV Technology