Property variables represent a property of the configuration file, web.cfg. You can access any entry in the web.cfg file (including user-defined entries) within an HTML template file by prefixing it with “$prop.”
For example, one of the lines in web.cfg, which specifies the number of entries displayed in a single page on a list form is as follows:
ListPageLength 10
You can refer to this variable in an HTML template with the specification:
$prop.ListPageLength
If you use the <PDM_INCLUDE> special tag to incorporate another file into a template file, you can specify additional properties as attributes of the <PDM_INCLUDE> tag. You can reference these properties in the included file in the same way as web.cfg properties. A property specified as a <PDM_INCLUDE> attribute that has the same name as a web.cfg property overrides the web.cfg property within the included file.
For example, the following <PDM_INCLUDE> tag creates a property called $prop.menubar that can be referenced within the std_body.htmpl file:
<PDM_INCLUDE FILE=std_body.htmpl menubar=no>
Note: You can refer to configuration file property xxx in two ways: $prop.xxx or $SESSION.xxx. Both return the same value. However, the $prop.xxx syntax is preferred because it involves less server overhead.
In addition to properties from web.cfg, there are several predefined properties that can be accessed with $prop. These are:
A string identifying the browser in use. This will be “IE” for Internet Explorer.
A string containing the current user's name, in the form “last_name, first_name middle_name.”
A string containing the factory associated with the current form, such as “cr” for requests or “iss” for issues.
A string containing the numeric form ID of the current form.
A string containing the name of the current HTML template, in the form xxx.htmpl.
A string containing the substring of the form name before the first underscore. For example, for the form detail_chg_edit.htmpl, form_name_1 would be “detail.”
A string containing the substring of the form name after the first underscore and before the last underscore (or dot). For example, for the form detail_chg_edit.htmpl, form_name_2 would be “chg.”
A string containing the substring of the form name after the last underscore and before the dot. For example, for the form detail_chg_edit.htmpl, form_name_3 would be “edit.” For the combination detail form, which has a file name of the form detail_xxx.htmpl, $prop.form_name_3 is set to the current view, either “ro” or “edit”.
A string containing the release level of the form. The PDM_PRAGMA statement contains more details on this property.
A string containing the numeric session ID of the current session.
A string containing the site-defined modification name of the form. The PDM_PRAGMA statement contains more details on this property.
A string containing “analyst,” “customer,” “employee,” or “guest.”
A string containing the version of the form. The PDM_PRAGMA statement contains more details on this property.
Copyright © 2013 CA.
All rights reserved.
|
|