derek | idea company wrote:
>>> and can
>>> this exhibit lens be inserted into the current lens for thumbnail or
>>> detail view? kinda like a sub lens? Thanks.
>> Not quite sure what you mean...
> So in trying to create the applet lens what i have right now is:
> <!-- Thumbnail View -->
> <div ex:role="exhibit-view"
> ex:viewClass="Exhibit.ThumbnailView"
> ex:showAll="false"
> ex:orders=".designer"
> ex:possibleOrders=".discipline">
> <div ex:role="exhibit-lens" class="nobelist-thumbnail">
> <img ex:src-content=".imageURL" />
> <div><span ex:content=".label"></span></div>
> <div><span ex:content=".discipline" class="year"></span></div>
> <div ex:role="exhibit-lens" ex:item-id-content=".id"
> ex:applet-codebase-content=".applet-codebase"
> ex:applet-param-content=".applet-param">
> <button
> ex:onclick="makeApplet(this.parentNode)">Show Applet</button>
> </div>
> </div>
>
> So the applet lens is living inside the thumbnail lens. I know I have
> to change the "ex:item-id-content=".id"" I'm assuming it should be the
> label or whatever the title of the project is.
Actually, lens templates cannot be nested, so ex:role="exhibit-lens" of
the inner lens template is not interpreted at all. Furthermore, as Johan
has noted, ".id" doesn't work. Instead, replace ".id" with "value" (no
period prefix).
If you want something equivalent to a nested lens template, do something
like this (for rendering papers written by an author):
<div ex:role="lens-template" ex:itemTypes="Person">
<div>Author: <span ex:content=".label"></span></div>
<ul ex:content=".paper">
<li><span ex:content=".label"></span>, <span
ex:content=".year"></span></li>
</ul>
</div>
When an element with ex:content (ul) has children elements (li), then
its children elements are used as the template to render the inner
items. So, ".year" is the year of each paper, not of the author.
> If this is confusing, feel free to suggest alternative syntaxes. Nothing
> is carved in stone.
>
> So it's probably not confusing for more Javascript inclined folk like
> yourselves, I don't think i'm quite fully confused. it would be
> interesting if it could be done in a way similar to how the img tag is
> handled (ie. <img ex:src-content="" />). Perhpas something like:
> <applet ex:height-content=".a" ex:width-content=".b"
> ex:code-content=".c" ex:archive-content=".d"
> ex:codebase-content=".e">
> <param ex:name-content=".f" ex:value=".g" />
> </applet>
>
> and in some sort of schema.js file you can specify all the values that
> appear across all of them, and the ex:value would go with each entry.
> and then this can live inside your already made lens like an img tag,
> or it code be put into a hidden div and using some AJAX tricks to make
> it appear or disappear again. I know no one really uses java applets
> anymore (well for things that flash can do better) so this syntax code
> be used for flash as well:
> <object ex:type-content=".a" ex:data-content=".b"
> ex:width-content=".c" height=".d">
> <param ex:name-content=".e" value=".f" />
> <img ex:src-content=".g" ex:alt-content=".h"
> ex:height-content=".i" ex:width-content=".j" /><!-- No Flash
> Detected -->
> </object>
>
> This code was based on code from an article on A List Apart for
> standards appropriate embedding of flash. Hopefully you get the
> idea. But I do like the idea of being able to control elements like
> with the img and being able to mostly dynamically control the various
> pieces of the code with the exhibit/json databases.
Have you tried that code? How does it break? It looks to me like it
should work.
David
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general