How HTML pages can be used with JXplorer

JXplorer loads HTML pages into the HTML view panel based on the object class(s) of the entry being viewed. For example, when viewing a 'person' entry, it looks for a 'person' subdirectory under the 'templates' subdirectory, and lists all the available html files within that person subdirectory as options to the user.

Within these html files, an 'extended' html comment tag is used to allow the display of entry data. Within the html code, the following tag may be used: <dxtemplate: name=(attribute name) [style=(display style)]> . [Attribute name] is the exact name of the attribute to display values of, or 'all' to show a list of all available attributes. The optional [display type] is one of either 'list', 'table', or 'plain', which sets how multiple values will be displayed.


... my html code ...

<dxtemplate: name='description'> (shows the value of 'description')
<dxtemplate: name='address' style='list'> (shows all addresses in an html list)
<dxtemplate:get-all-attributes/> (shows all attribute values in a table)

The last example lists all available data in the entry, without needing to explicitly name the various attributes:

Listing all Attributes in an HTML entry

How to install and use custom HTML pages

Once the custom html page is written, simply place it in a subdirectory named after the appropriate object class, and place that subdirectory under the 'templates' subdirectory. The above page for viewing 'person' data was saved under /templates/person/ . Look at the existing subdirectories under templates to see some examples. If you have a template that you want to be available for all entries, regardless of object class, stick it at the base 'templates' subdirectory level, and it will always appear as an option.

What about Hyperlinks?

You can stick hyperlinks (say to extended help, or further resources) in your html pages. Bear in mind however that the Java html component in Java 1.3 does not support Javascript or VB script, and is not as robust as a commercial web browser.

» top