IPF_KEYS

From EDM2
Jump to: navigation, search

Some online documents (INF) have conditional sections which should be displayed to select users or on particular system configurations. This is accomplished through the use of the hide tag in the IPF source document. If the specific key or keys are added to the IPF_KEYS variable, these otherwise-hidden sections are made visible to the user.

SET IPF_KEYS=key_1+key_2+key_n

Parameters

document-specific

This function is useful when the author wishes to tailor the information for specific users, such as displaying different levels of information on the basis of the user's system configuration (networked, non-networked, etc.). The author assigns each level of hidden content a value with the key= attribute. When a topic containing hide tags is selected for viewing, the IPF viewer checks for the IPF_KEYS environment variable determine what level of information to show the user. If a key matching one in the document is found, the information between the hide tags is displayed; otherwise, the information remains hidden.

The author may hide lines of text within the window, a word or a phrase within a line, a link, or a graphic.

In some situations, the same user may need to view more than one level of hidden information. This is accomplished by concatenating values in IPF_KEYS, as in the above example.

The following IPF source compiled as an INF or HLP document:

:h1 res=001.Installation Procedure
:ol.
:li.
:hide key='network_user'.
Instruction for Networked Users.
:ehide.
:hide key='standalone_user'.
Instruction for Standalone Users.
:ehide.
:li.
Shut down the system from the Desktop.
:li.
Press Ctl+Alt+Del to restart the system.
:eol.

produces the following in the IPF document reader when IPF_KEYS=NETWORK_USER:

  1. Instruction for Networked Users.
  2. Shut down the system from the Desktop.
  3. Press Ctl+Alt+Del to restart the system.

Care should be taken by authors to make keys unique across all (possibly unknown) documents installed on the system. Avoiding common phrases such as "hidden" or "admin" is a good start.

While not often used, this is a powerful feature of the IPF specification.