Difference between revisions of "Displaying Units"

From CollectiveAccess Documentation
Jump to: navigation, search
(Using relativity)
(Using relativity)
Line 4: Line 4:
  
 
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.
 
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></unit><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:

Revision as of 20:33, 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.

^ca_objects.preferred_labels
^ca_entities.preferred_labels
<unit relativeTo="ca_entities" delimiter="
</unit>
"> ^ca_entities.statement.statement_text
^ca_entities.statement.statement_date
^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:

Namespaces

Variants
Actions
Navigation
Tools
User
Personal tools