c0dem4gnetic wrote:
> My dataset
> --snip--
> {
>     "items" : [
>         {   type : "Entry",
>             label : "Entry #1",
>             media: ["Media #1", "Media #2"]
>         },
>         {   type: "Media",
>             id: "Media #1",
>             label: "Media object 1",
>             imageurl: "http://picasa.google.com/linux/
> labs_default.gif"
>         },
>         {   type: "Media",
>             id: "Media #1",
>             label: "Media object 2",
>             imageurl: "http://assets0.twitter.com/images/twitter.png";
>         }
>     ]
> }
> --snip--
>
> Important parts of my exhibit
> --snip--
> <td ex:role="viewPanel">
>       <div ex:role="view" ex:collectionID="entryItems">
>               <div ex:role="lens" class="entry">
>                       <p><span ex:content=".type"></span></span>
>                       <ul ex:if-exists=".media">
>                               <img ex:src-content=".media.imageurl" />
>                       </ul>
>               </div>
>       </div>
> </td>
> --snip--
>
> I was hoping that this would generate two img-elements, but
> unfortunatly it does not. If I replace <img ex:src-
> content=".media.imageurl" /> with <span ex:content=".media.imageurl"></
> span> it correctly renders "       
> http://picasa.google.com/linux/labs_default.gif
> and http://assets0.twitter.com/images/twitter.png";.
>
> Is there some way that I can inline those images? Or should I just
> render out those spans with a specific class name and then replace
> them post-exhibit?
>   
<img ex:src-content=".media.imageurl" /> would generate

    <img src="http://picasa.google.com/linux/labs_default.gif and 
http://assets0.twitter.com/images/twitter.png"; />

which is not what you want... Please try

    <span ex:content=".media.imageurl"><img ex:src-content="value" /></span>

Or even more properly

    <span ex:content=".media"><img ex:src-content=".imageurl" 
ex:title-content=".label" /></span>

The idea is that if you have more HTML elements inside an element with 
ex:content, then the inner HTML elements are used as the template for 
each value that the ex:content expression evaluates to.

David

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to