Copied to clipboard

Flag this post as spam?

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


  • Garrett Fisher 341 posts 496 karma points
    Sep 24, 2009 @ 20:49
    Garrett Fisher
    0

    Media Picker Property Type

    Hi,

     

    On my home page document type I've got a Media Picker property which allows the use to choose a Flash movie to display.  In the template for this page, I am trying to insert the name of the movie file as follows:

     

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
    width="100" height="100"><param name="movie"
    value="<umbraco:Item field='FlashMovie' stripParagraph='true'
    runat='server'></umbraco:Item>" /><param name="quality"
    value="high" /><param name="menu" value="false" /><param
    name="wmode" value="transparent" /><embed src="<umbraco:Item
    field='FlashMovie' stripParagraph='true'
    runat='server'></umbraco:Item>" wmode="transparent"
    quality="high" menu="false"
    pluginspage="http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash" width="100"
    height="100"></embed></object>

    The problem I'm having is that the

    <umbraco:Item field='FlashMovie' stripParagraph='true'
    runat='server'></umbraco:Item>

    tag is returning the file's ID, which clearly I don't need.  How do I write the file's path and filename to the page?

     

    Thanks,

    Garrett

  • Masood Afzal 176 posts 522 karma points
    Sep 24, 2009 @ 20:52
    Masood Afzal
    0

    xslt sample

    <xsl:value-of select="umbraco.library:GetMedia($currentPage/data [@alias='FlashMovie'], 'false')/data [@alias='umbracoFile']" />
  • Masood Afzal 176 posts 522 karma points
    Sep 24, 2009 @ 20:53
    Masood Afzal
    0

    Consider using library function

    umbraco.library:GetMedia(...)
  • Garrett Fisher 341 posts 496 karma points
    Sep 24, 2009 @ 21:18
    Garrett Fisher
    0

    Thanks!

    Doesn't look like I can place this XSLT directly into the template where my <umbraco:Item> tag was though.  Is this the case?  I'm still having a hard time figuring out how all these different "pieces" fit together in Umbraco.  Not suer when to have an XSLT file and when to put it in the template, etc.  Can I put this <xsl:value-of> tag in the template?  If not, then how do I refer to the XSLT file I create for it in the template?

    //Garrett

  • Masood Afzal 176 posts 522 karma points
    Sep 24, 2009 @ 22:29
Please Sign in or register to post replies

Write your reply to:

Draft