Thanks Matt,
It looks like this is achieved by essentially having a list of ISBNs
scraped from the page into a single array (as metadef element), then
the Syndetics extension just reads them out one at a time and inserts
into the matching Juice insert. I can see how that can work I think -
but obviously a bit of a work around. If I've misinterpreted how this
works, ignore the next comments and help me understand!
I might copy this - it would probably work as an approach for what I'm
trying to do in this instance - but it's a shame that this means I
can't just throw additional extensions into the page (e.g. link to
worldcat) without writing an additional worldcat extension that knows
about my special array of ISBNs etc. This was one of the factors
behind looking at Juice - the idea that once I'd got a metadef we
could reuse the existing extensions as well as anything new.
What I've been thinking about is the ability to set a jQuery selector
context before running aspects of juice - so that all subsequent
selectors etc. work from within that context.
So - if you have a list of items each wrapped in a <li> (for
simplicity), you could first set a context by selecting <li>, do stuff
like metadef scraping and inserts in that context, then iterate over
each <li> to do this several times over. Of course the default context
would be the whole doc, so that you could continue using exactly as
currently.
Does this make sense? I've got something of this nature working for
the metadef bit, but I'm struggling for the inserts - although the
syndetics code might help here - I'll have a bit more of a play then
post back. Anyway, if you are looking at options for future
developments of Juice, there's my idea!
Owen