Brannon King wrote:
> David Huynh wrote:
>
>> Brannon King wrote:
>>
>>
>>> When using the tabular view, how does one restrict which item types get
>>> shown in the grid? I have five item types in my JSON data: Person, Family,
>>> Marriage, Birth, and Death. Person items include references to the other
>>> four. I only want to show Person-type items in my Tabular view. How is it
>>> done? My columns all reference members of Person only. Thanks for your
>>> time.
>>>
>>>
>> Yes, there is a way.
>>
>> In Exhibit, each facet or view is connected to a "collection". The facet
>> filters that collection and the view shows items in that collection. By
>> default, there is a "default" collection that contains all items in the
>> exhibit. Also by default, each facet or view is connected to that
>> "default" collection.
>>
>> To redefine the default collection, do something like this
>>
>> <html>
>> ...
>> <body>
>> <div ex:role="collection" ex:itemTypes="Person"></div>
>> ...
>>
>> That's all needed to do what you want.
>>
> Thanks. That's the idea. However, I'd like to be able to do just that on
> a per-view basis. It seems that div only works outside the viewPanel.
> How can I change the collection for each view?
>
Sure you can. Define new collections by giving them IDs
<div ex:role="collection" ex:itemTypes="Family" id="the-families"></div>
and bind views to collections using ex:collectionID
<div ex:role="view"
...
ex:collectionID="the-families"
...>
</div>
Here is an example:
http://people.csail.mit.edu/dfhuynh/projects/graph-based-exhibit/graph-based-exhibit2.html
David
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general