Softerra LDAP Administrator Help | Show AllHide All |
HTML page templates define how LDAP Administrator displays LDAP entries in the HTML Pane. You can modify the HTML page templates installed by LDAP Administrator and create your own templates for specific LDAP object classes. For details, see Customizing HTML Views.
To edit HTML page templates you need to possess HTML, CSS and, in most advanced cases, JQuery skills. |
HTML page template is a regular HTML page that contains special text patterns called placeholders. When generating an HTML page from a template, LDAP Administrator replaces all the placeholders in the template with the corresponding data. In such a way, information from the LDAP server is passed to the HTML page.
##placeholder-type, [':', placeholder-parameters]## placeholder-type = 'ATTR_INFO' | 'ALLATTRS_INFO' | 'CHILDREN' | 'ATTR_IMGLINK' | 'ITEM_INFO' | 'APP_PATH' | 'APP_PATH_BS' | 'APP_PATH_WEB' | 'HTML_PATH' | 'HTML_PATH_BS' | 'HTML_PATH_WEB' | 'ERROR_NODE'; placeholder-parameters = placeholder-parameter, [{',', placeholder-parameter}].
HTML Pane supports the following placeholders to generate HTML pages for LDAP entries:
The ATTR_INFO placeholder is used to display values of a specific LDAP attribute. This placeholder is replaced with attribute values and some additional information necessary to display and edit these values.
If you want an HTML page to display an LDAP attribute, you need to add the ATTR_INFO placeholder to the HTML page template and specify the name of the attribute as the placeholder parameter. For example, to display values of the otherMobile attribute on an HTML page, add the following tag to the page template in the place where you want the attribute values to be displayed:
<input type="hidden" class="ldapAttrInfo" value='{##ATTR_INFO:otherMobile##}' />
The ALLATTRS_INFO placeholder is used to display all available LDAP entry attributes on the HTML page.
If you want an HTML page to display all attributes of the selected LDAP entry, you need to add the following tag to the place where you want the attributes to be displayed:
<input type="hidden" class="ldapAllAttrsInfo" value='{##ALLATTRS_INFO:##}' />
The CHILDREN placeholder is used to display child nodes of the selected LDAP entry.
If you want an HTML page to display sub-entries of an LDAP entry, you need to add the following tag to the place where you want the sub-entries to be displayed:
<input type="hidden" class="childNodes" value='{##CHILDREN##}' />
The ATTR_IMGLINK placeholder is used to display images stored in LDAP attribute values. This placeholder is replaced with a path to a temporary file that contains the value of the LDAP attribute specified as the parameter of the placeholder.
For example, if you want an HTML page to display an image that is stored in the jpegPhoto attribute, you need to add the following tag to the HTML page template:
<img src="##ATTR_IMGLINK:jpegPhoto##">
The ITEM_INFO placeholder is used to insert common information about the currently selected LDAP entry to the HTML page.
##ITEM_INFO:info-type,flag## info-type = 'name' | 'value' | 'size' | 'type'; flag = 'norm' | 'desc' | 'full' | 'edit' | 'asis';
where
name – the name of the object,
value – the object value,
size – the size of the object,
type – the type of the object,
norm – normal format,
desc – descriptive format,
full - full format,
edit – format used when editing values,
asis - raw format (unprocessed).
For example, to insert the RDN of the currently selected entry, use the following placeholder: ##ITEM_INFO:name,desc##. This placeholder will be replaced with something like CN=John Doe.
To insert the DN of the currently selected entry, use the following placeholder: ##ITEM_INFO:name,full##. This placeholder will be replaced with something like CN=John Doe,DC=company,DC=com.
HTML_PATH_WEB placeholder is replaced with the path to the corresponding folder of LDAP Administrator.
For example, if LDAP Administrator is installed in folder 'C:\Program files\Softerra\LDAP Administrator\', the ##HTML_PATH_WEB## placeholder will be replaced with the file://localhost/C:/Program files/Softerra/LDAP Administrator/HtmlView value.