Difference between revisions of "Displaying Units"

From CollectiveAccess Documentation
Jump to: navigation, search
(Using relativity)
(Using relativity)
Line 15: Line 15:
  
 
The result is a list of artwork titles, artist names and their statements for the works in the collection:
 
The result is a list of artwork titles, artist names and their statements for the works in the collection:
 +
 +
[[File:RelativityDisplay.png|800px]]
 +
 +
In addition to pulling the metadata (that has a "Bacon number" of 2) into the display the unit tag is also the reason the containers are correctly formatted.  Without <unit> tags repeating containers would look like this:
 +
 +
Address Line 1 A; Address Line 1 B
 +
Address Line 2 A; Address Line 2 B
 +
Address Line 3 A; Address Line 3 B
 +
 +
rather than this:
 +
 +
Address Line 1 A
 +
Address Line 2 A
 +
Address Line 3 A
 +
 +
Address Line 1 B
 +
Address Line 2 B
 +
Address Line 3 B

Revision as of 20:40, 7 November 2013

Using relativity

One use of the <unit> tag is to allow cataloguers to display metadata with some relative distance to the chosen record. We could call this the Six Degrees of Kevin Bacon for CollectiveAccess.

Let's say you're creating a Collection summary and you'd like to display metadata about Entities, but Entities aren't related directly to Collections. Perhaps they are related to Objects related to the Collection. Never fear! Just as Bruce Willis is 2 degrees away from Kevin Bacon (thanks to Brad Pitt, "The Hamster Factor" and the movie "8"), Entities are also 2 degrees away from Collections thanks to their relativity to Objects.

How does this look in practice? Here's a display template that is placed on the object bundle (through the GUI) or object placement (in a profile). It pulls statement metadata from a container on the Entity related related to the Object.

<em><strong>^ca_objects.preferred_labels</strong></em><br>
^ca_entities.preferred_labels
<br><unit relativeTo="ca_entities" delimiter="<br><br/>">
^ca_entities.statement.statement_text<br/>^ca_entities.statement.statement_date<br/>^ca_entities.statement.statement_source
</unit>

The result is a list of artwork titles, artist names and their statements for the works in the collection:

RelativityDisplay.png

In addition to pulling the metadata (that has a "Bacon number" of 2) into the display the unit tag is also the reason the containers are correctly formatted. Without <unit> tags repeating containers would look like this:

Address Line 1 A; Address Line 1 B Address Line 2 A; Address Line 2 B Address Line 3 A; Address Line 3 B

rather than this:

Address Line 1 A Address Line 2 A Address Line 3 A

Address Line 1 B Address Line 2 B Address Line 3 B

Namespaces

Variants
Actions
Navigation
Tools
User
Personal tools