Hehe i've read this thread, but the problem is when i add more than 1 picture via DAMP i can't retrieve the data.
Everything works fine with just 1 Picture (DAMP multiple=no result).
Like said before data with @Model.multiImage.mediaItem.Image.umbracoFile for 1 Picture works.
Looping through gives error back.
@foreach (var item in Model.multiImage.mediaItem.Image.umbracoFile) <- must give back a loop through all umbracoFiles and store it in item { <img src="@item"/> }
Razorsnippet for retrieving Multiimages with Damp
@foreach (var item in Model.multiImage)
{
<img src="@item.mediaItem.Image.umbracoFile"/>
}
This is my query so far. Nothings coming back. Some Ideas ? Thanks for help so far.
Ah okaay this is my XML output:
<multiImage>
<DAMP fullMedia="">
<mediaItem>
<Image id="1305" version="eb6e6737-a250-45e6-b09b-f3fd916d69a0" parentID="1251" level="3" writerID="0" nodeType="1032" template="0" sortOrder="7" createDate="2011-03-26T11:08:30" updateDate="2011-03-26T11:08:30" nodeName="abby_flexi_capture" urlName="abby_flexi_capture" writerName="admin" nodeTypeAlias="Image" path="-1,1249,1251,1305">
<umbracoFile>/media/1800/abby_flexi_capture.jpg</umbracoFile>
<umbracoWidth>585</umbracoWidth>
<umbracoHeight>185</umbracoHeight>
<umbracoBytes>25538</umbracoBytes>
<umbracoExtension>jpg</umbracoExtension>
</Image>
</mediaItem>
<mediaItem>
<Image id="1306" version="64c52dfe-4601-452c-ac44-6643a461e933" parentID="1251" level="3" writerID="0" nodeType="1032" template="0" sortOrder="8" createDate="2011-03-26T11:13:13" updateDate="2011-03-26T11:13:14" nodeName="beratung" urlName="beratung" writerName="admin" nodeTypeAlias="Image" path="-1,1249,1251,1306">
<umbracoFile>/media/1807/beratung.jpg</umbracoFile>
<umbracoWidth>585</umbracoWidth>
<umbracoHeight>185</umbracoHeight>
<umbracoBytes>23498</umbracoBytes>
<umbracoExtension>jpg</umbracoExtension>
</Image>
</mediaItem>
</DAMP>
</multiImage>
Hi Toni,
Have a look at this topic: http://our.umbraco.org/forum/developers/razor/17682-DynamicXml-not-working.
Jeroen
Hehe i've read this thread, but the problem is when i add more than 1 picture via DAMP i can't retrieve the data.
Everything works fine with just 1 Picture (DAMP multiple=no result).
Like said before data with @Model.multiImage.mediaItem.Image.umbracoFile for 1 Picture works.
Looping through gives error back.
@foreach (var item in Model.multiImage.mediaItem.Image.umbracoFile) <- must give back a loop through all umbracoFiles and store it in item
{
<img src="@item"/>
}
Please check this out :) thanks alot
Solved and here's the new razor code:
is working on a reply...