Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Feb 23, 2011 @ 14:08
    Sebastiaan Janssen
    0

    DynamicXml not working?

    Sorry for all the posts, I'm just checking here first to see if I'm not doing things wrong, before adding issues to Codeplex.

    So according to the comments in this changeset, I should be able to do some really cool DynamicXml stuff.

    Now, my input is this:

                <picker>
                  <DAMP fullMedia="">
                    <mediaItem>
                      <Image id="8650" version="53392f76-fc34-40af-b0f3-ec9751ebe785" parentID="5204" level="2" writerID="0" nodeType="1032" template="0" sortOrder="20" createDate="2011-02-18T11:32:33" updateDate="2011-02-18T11:32:33" nodeName="raketje_01" urlName="raketje_01" writerName="Administrator" nodeTypeAlias="Image" path="-1,5204,8650">
                        <umbracoFile>/media/1688075/raketje_01.jpg</umbracoFile>
                        <umbracoWidth>652</umbracoWidth>
                        <umbracoHeight>211</umbracoHeight>
                        <umbracoBytes>43436</umbracoBytes>
                        <umbracoExtension>jpg</umbracoExtension>
                        <imageCrop>
                          <crops date="18/02/2011 11:32:33">
                            <crop name="Large" x="0" y="0" x2="652" y2="210" url="/media/1688075/raketje_01_Large.jpg" />
                            <crop name="Medium" x="124" y="0" x2="527" y2="211" url="/media/1688075/raketje_01_Medium.jpg" />
                            <crop name="Small" x="220" y="0" x2="431" y2="211" url="/media/1688075/raketje_01_Small.jpg" />
                          </crops>
                        </imageCrop>
                      </Image>
                    </mediaItem>
                  </DAMP>
                </picker>

    So I expect to be able to do:

    @Model.Picker.Damp.MediaItem.Image.UmbracoFile

    But unfortunately it gives me this error:

    'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'Damp'

    Am I doing it wrong? Tried with capitals in the correct places as well, but it just doesn't know what Damp is.

  • Gareth Evans 142 posts 334 karma points c-trib
    Feb 24, 2011 @ 00:35
    Gareth Evans
    0

    DynamicXML is case sensitive, did you try DAMP?

    Is .Picker in your sample the alias for the property containing the XML?

    You omit the root node when using it btw

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Feb 24, 2011 @ 08:10
    Sebastiaan Janssen
    0

    Yes, I tried DAMP, but as I read it now I should use :

    @Model.Picker.mediaItem.Image.umbracoFile

    As Picker is the property, I leave out the root node which is Damp and the casing is then correct. I'll report back after trying it, thanks!

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Feb 24, 2011 @ 09:45
    Sebastiaan Janssen
    0

    W00t! That worked :-D

Please Sign in or register to post replies

Write your reply to:

Draft