Copied to clipboard

Flag this post as spam?

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


  • Gert Peter Brigsted 30 posts 61 karma points
    Apr 28, 2010 @ 18:31
    Gert Peter Brigsted
    1

    Media xml

    Hi! :) Is there any way to see the full xml for the media files, just like I can see the full content xml in /data/umbraco.config? And are those image property names (umbracoWidth, umbracoSize, etc.) some special "system" names, or is there any way to change them?

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Apr 28, 2010 @ 20:27
    Chriztian Steinmeier
    3

    Hi Gert,

    When using GetMedia(ID, false()) you get something like this:

    <node id="3329" version="5b48a198-8012-411d-a4f0-152b17f34952" parentID="3328" level="3" writerID="2" nodeType="1032" template="0" sortOrder="1" createDate="2010-03-05T16:20:53" updateDate="2010-03-05T16:20:53" nodeName="movie" urlName="movie" writerName="Redaktør" nodeTypeAlias="Image" path="-1,2663,3328,3329">
        <data alias="umbracoFile">/media/31618/movie.flv</data>
        <data alias="umbracoWidth" />
        <data alias="umbracoHeight" />
        <data alias="umbracoBytes">5831547</data>
        <data alias="umbracoExtension">flv</data>
      </node>

    Yes, they are reserved system names.

    /Chriztian

  • Kim Andersen 1447 posts 2196 karma points MVP
    Apr 28, 2010 @ 20:41
    Kim Andersen
    3

    Gert, when you want to see the XML that Chriztian provided, you could do something like this:

    <xsl:variable name="imgUrl" select="umbraco.library:GetMedia($currentPage/data [@alias = 'mainImage'], 'false')"/>
    <textarea>
    <xsl:copy-of select="$imgUrl"/>
    </textarea>

    This would give you the XML in the textarea, and you can the copy the XML from there and into Visual Studio/Notepad etc., to get a better view of the code.

    Just a small tip, when you want to view your XMLin the future :)

    /Kim A

Please Sign in or register to post replies

Write your reply to:

Draft