Custom Fields
Custom fields carry the content authored in the Driver Designer — Remarks, Units, Front Panel notes, examples, and so on — into the generated help. The content is written per member in the help editor; the template decides where it appears on the page.
Defining a custom field
Section titled “Defining a custom field”In the Markdown template system, custom fields are auto-discovered from the sibling files in a layout’s folder. For example, in the default IVI.NET template:
layouts/method/method.md The method layoutlayouts/method/remarks.md Defines a "Remarks" custom field for methodslayouts/property/property.md The property layoutlayouts/property/remarks.md A "Remarks" custom field for propertieslayouts/property/units.md A "Units" custom field for propertiesThe file name (minus .md) is the custom field’s name, and it is the name the Help Editor
presents as a tab for that entity type.
The file also defines the markup surrounding the authored value on the page: the guard, the section container, and the heading.
{{#customFields.remarks}}:::: nimbus:remarks
## Remarks
{{{value}}}
::::{{/customFields.remarks}}The guard suppresses the entire section, including its heading, when the field is empty.
Placing a custom field on the page
Section titled “Placing a custom field on the page”The layout determines where a custom field appears, by referencing it:
{{> remarks}}The reference is placed at the position the section is to occupy. In the default IVI.NET method layout, Remarks appears after the return value and before the instrument commands.
A field file that no layout references defines a field that is offered for authoring but never rendered. A reference with no corresponding file fails the help build.
Defining a Front Panel field for method pages therefore requires two files:
layouts/method/frontpanel.md, following the structure shown above withfrontpanelin place ofremarks.- A
{{> frontpanel}}reference inlayouts/method/method.md.
Both reside in the help project’s Template folder and are versioned with the driver.
Authoring custom field content
Section titled “Authoring custom field content”Custom fields are authored as Markdown in the embedded help editor, with a live side-by-side preview. The content is preserved through every output format. Because Markdown allows embedded HTML, raw HTML may be placed inside a custom field wherever it is needed for layout, tables, or images.
To include an image, place the file in the template’s assets/ folder and reference it with a
topic-relative link, as described in
The Template Manifest.
To link to a generated API topic from a custom field, use a cross-reference — see Linking to API Topics.
See Using the Help Editor for the authoring experience.