Sorting on complex expressions in Exhibit

43 views
Skip to first unread message

Arithmeticus

unread,
Aug 8, 2012, 3:40:21 PM8/8/12
to simile-...@googlegroups.com
Greetings. In Exhibit, in an viewpanel of collection A related to items from collection B (not shown), I want to invoke a list of properties/objects in B related to each object in A, but in a customized order. So 
<span ex:content=".itemA-attribute!itemB-keywords"> pulls up a list objects from B related to the property in that instance of A, but in B-object-label sequence (alphabetically). How would I sort that list by some other property of B, say by year, descending? That is, I'm looking for something like:
<span ex:content=".itemA-attribute!itemB-keywords" ex:sort=".itemB-year" ex:direction="descending"> 

Is this possible?

jk

David Karger

unread,
Aug 14, 2012, 10:58:46 AM8/14/12
to simile-...@googlegroups.com, Arithmeticus
I can't think of any way to support this behavior right now. Lenses
don't have a lot of tunability in how they render. If you want to
write some javascript, you could possible write your own code to sort
the spans *after* the item has been rendered (there is an event
triggered when an item is shown; you could bind to that event and
manipulate the dom fragment). you could use the ex:...-content trick
to create an attribute containing your desired sort tag in each span,
but you'd have to do the sort yourself.
> --
> You received this message because you are subscribed to the Google
> Groups "SIMILE Widgets" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/simile-widgets/-/Yu8Fwo06tTEJ.
> To post to this group, send email to simile-...@googlegroups.com.
> To unsubscribe from this group, send email to
> simile-widget...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/simile-widgets?hl=en.
Reply all
Reply to author
Forward
0 new messages