Lens Templates

To add a custom lens template your exhibit, add

 <div ex:role="lens"> ... </div>

Settings include:

setting name type of value default choices meaning
ex:itemTypes list of item-type-names (none) the item types which should be displayed using this lens; if unspecified, this is the default lens for all item types

The URL of an Exhibit page followed by a hash with the label of an item will display a dialog box with that item's properties. You can create a lens template for this dialog box to specify which properties are displayed and how. The lens needs to be inside the body of the HTML page but outside any view elements, with its display style set to none. For example, this lens controls what will be displayed in a dialog for a single item of type Person:

 <div ex:role="lens" ex:itemTypes="Person"
 style="display: none">
 ...
 </div>

ex:onshow can be used to execute Javascript or change style attributes when the lens is displayed (see mailing list for more details).