Rob Nelson wrote:
> I have a question about collections and views in Exhibit that I was 
> hoping someone there could help me with.  I'd like to have different 
> views use different collections.  I'm using exhibit to display film 
> exhibition information, and I have a number of items: screening, films, 
> venues, runs (of films) etc.  Right now I'm setting my root collection 
> to screenings, which produces a number of views of that data I'm looking 
> for.  What I'd like to do is to switch collections for some of the 
> views, e.g. a map view which would use film items rather than screenings 
> to map nation of production for those films.  I was hoping that 
> collections would work like lenses and I could do something like the 
> following:
>
>                 <div
>                         ex:role="view"
>                         ex:viewClass="Map"
>                         ex:latlng=".prod_nation.ll"
>                         ex:colorKey=".venue_id.label">
>                     <div ex:role="collection" ex:itemTypes="film"></div>
>                 </div>
>
> That didn't work.  Any help or suggestions you could provide would be 
> much appreciated. 
>   
Hi Rob,

You need to define collections outside the views and give them IDs, e.g.,

    <div ex:role="collection" ex:itemTypes="film" id="the-films"></div>

Then you can link the views to the collections through those IDs

    <div ex:role="view"
       ex:collectionID="the-films"
       ...></div>

You can also link the facets to the collections in the same way. Note 
that a facet only affects the collection that it's linked to.

Cheers,

David

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to