Copied to clipboard

Flag this post as spam?

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


  • syn-rg 282 posts 425 karma points
    May 20, 2011 @ 04:01
    syn-rg
    0

    How to update from Upload to Media picker?

    I'm using Umbraco 4.0 and I'm making a change to an image gallery. Previously I used the "Upload" datatype on my "imageNode" to upload an image to my imageNode within the Content section. Now I've changed it to the "Media Picker" datatype to pick images from the Media section. However I'm struggling with getting the media picker image to display.

    Here's my code:

    This works for my "upload" datatype

    <a href="{concat(substring-before($imageNode/data [@alias='umbracoFile'],'.'), '_thumb_320.jpg')}" rel="lightbox" title="{$imageNode/@nodeName}" id="aimage{$imageNode/@id}">
        <img src="{concat(substring-before($imageNode/data [@alias='umbracoFile'],'.'), '_thumb_142.jpg')}" border="0" />
    </a>

    This doesn't work for my "media picker" datatype. I also want it to concat the '_thumb_142.jpg'

    <a href="{concat(substring-before($imageNode/data [@alias='umbracoFile'],'.'), '_thumb_320.jpg')}" rel="lightbox" title="{$imageNode/@nodeName}" id="aimage{$imageNode/@id}">
        <img alt="">
          <xsl:attribute name="src">
            <xsl:value-of select="umbraco.library:GetMedia($imageNode/data [@alias='imageGalleryPhoto'], 'false')/data [@alias = 'umbracoFile']" />
          </xsl:attribute>
        </img>
    </a>

     

    Can anyone help me with this issue?

    Cheers,
    JV

    Here's my entire XSLT code:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [
    <!ENTITY nbsp "&#x00A0;">]>
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    xmlns:emint="urn:my-scripts"
    exclude-result-prefixes="msxml umbraco.library">
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:variable name="divOpen"><xsl:text>&lt;div class="image_padding nitroGallery"&gt;</xsl:text></xsl:variable>
    <xsl:variable name="divClose"><xsl:text>&lt;/div&gt;</xsl:text></xsl:variable>
    <xsl:template match="/">
    <!-- start writing XSLT -->
    </xsl:template>
    <xsl:template name="imageTemplate">
    <xsl:param name="imageNode"/>
    <xsl:param name="imageCurrentPageNumber"/>
    <xsl:param name="imageRecordsPerPage"/>
    <xsl:variable name="firstRecordIndex" select="(number($imageCurrentPageNumber) * number($imageRecordsPerPage)) + 1" />
    <xsl:if test="(position() - 1) mod 4 = 0 and position() &gt; $firstRecordIndex">
    <xsl:value-of select="$divClose" disable-output-escaping="yes"/>
    </xsl:if>
    <xsl:if test="(position() - 1) mod 4 = 0 or position() = $firstRecordIndex">
    <xsl:value-of select="$divOpen" disable-output-escaping="yes"/>
    </xsl:if>

    <div>
    <xsl:if test="position() mod 4 &gt; 0">
    <xsl:attribute name="class">image_1-3</xsl:attribute>
    </xsl:if>
    <xsl:if test="position() mod 4 = 0">
    <xsl:attribute name="class">image_4</xsl:attribute>
    </xsl:if>
    <a href="{concat(substring-before($imageNode/data [@alias='umbracoFile'],'.'), '_thumb_320.jpg')}" rel="lightbox" title="{$imageNode/@nodeName}" id="aimage{$imageNode/@id}">
    <img src="{concat(substring-before($imageNode/data [@alias='umbracoFile'],'.'), '_thumb_142.jpg')}" border="0" />
    <!--<img alt="">
    <xsl:attribute name="src">
    <xsl:value-of select="umbraco.library:GetMedia($imageNode/data [@alias='imageGalleryPhoto'], 'false')/data [@alias = 'umbracoFile']" />
    </xsl:attribute>
    </img>-->

    </a>
    <div style="display:none" rel="lightbox" id="divaimage{$imageNode/@id}">
    <xsl:call-template name="imageDetailsTemplate">
    <xsl:with-param name="imageNode" select="."/></xsl:call-template>
    </div>
    <a href="{concat(substring-before($imageNode/data [@alias='umbracoFile'],'.'), '_thumb_320.jpg')}" rel="lightbox" title="{$imageNode/@nodeName}" id="aimage{$imageNode/@id}"><xsl:value-of select="$imageNode/@nodeName"/></a>
    <xsl:if test="./data [@alias = 'imageLicType'] = 'talent fees apply'">
    <span class="TalentFeesApply">(talent fees apply)</span>
    </xsl:if>
    <xsl:if test="./data [@alias = 'imageLicType'] = 'royalty free'">
    <span class="RoyaltyFree">(royalty free)</span>
    </xsl:if>
    <xsl:if test="./data [@alias = 'imageLicType'] ='other'">
    <span class="RoyaltyFreeOther">(<xsl:value-of select="./data [@alias = 'other']/text()"/>)</span>
    </xsl:if>
    </div>


    <xsl:if test="position() = last()">
    <xsl:value-of select="$divClose" disable-output-escaping="yes"/>
    </xsl:if>
    </xsl:template>
    <xsl:template name="imageDetailsTemplate">
    <xsl:param name="imageNode"/>
    <div class="Details">
    <div id="left">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top" width="100"><p style="text-align:right"><strong>Image&nbsp;number:</strong></p></td>
    <td valign="top"><p><xsl:value-of select="$imageNode/@nodeName" disable-output-escaping="yes" /></p></td>
    </tr>
    <xsl:if test="$imageNode/data [@alias = 'imageLicType'] != ''">
    <tr>
    <td valign="top"><p style="text-align:right"><strong>License&nbsp;type:</strong></p></td>
    <td valign="top"><p><xsl:if test="$imageNode/data [@alias = 'imageLicType'] = 'other'">
    <xsl:value-of select="$imageNode/data [@alias = 'other']" />
    </xsl:if>
    <xsl:if test="$imageNode/data [@alias = 'imageLicType'] != ''">
    <span>
    <xsl:if test="$imageNode/data [@alias = 'imageLicType'] = 'other'"> <xsl:attribute name="class">fineDetailOther</xsl:attribute> </xsl:if>
    <xsl:if test="$imageNode/data [@alias = 'imageLicType'] = 'talent fees apply'"> <xsl:attribute name="class">fineDetailRed</xsl:attribute> </xsl:if>
    <xsl:value-of select="$imageNode/data [@alias = 'imageLicType']" />
    </span>
    </xsl:if>
    </p>
    </td>
    </tr>
    </xsl:if>
    <tr>
    <td valign="top"><p style="text-align:right"><strong>Category:</strong></p></td>
    <td valign="top"><p><xsl:value-of select="$imageNode/parent::node/@nodeName" disable-output-escaping="yes" /></p></td>
    </tr>
    <xsl:if test="$imageNode/data [@alias = 'imageDescription'] != ''">
    <tr>
    <td valign="top"><p style="text-align:right"><strong>Description:</strong></p></td>
    <td valign="top"><p><xsl:value-of select="data [@alias = 'imageDescription']"/></p>
    </td>
    </tr>
    </xsl:if>
    <xsl:if test="$imageNode/data [@alias = 'keywords'] != ''">
    <tr>
    <td valign="top"><p style="text-align:right"><strong>Keywords:</strong></p></td>
    <td valign="top"><p><xsl:value-of select="data [@alias = 'keywords']"/></p>
    </td>
    </tr>
    </xsl:if>
    </table>
    </div>
    <div id="right">
    <h1>Download</h1>
    <!-- THIS IS THE LOW RES IMAGE CODE -->
    <xsl:if test="$imageNode/data [@alias = 'umbracoFile'] != ''">
    <p>
    <a href="{concat(substring-before($imageNode/data [@alias='umbracoFile'],'.'), '_thumb_320.jpg')}" title="Low resolution image">
    <xsl:attribute name="class">download</xsl:attribute>
    Low resolution image</a> <span>(<xsl:value-of select="data [@alias = 'umbracoWidth']"/> x <xsl:value-of select="data [@alias = 'umbracoHeight']"/> px @ 96 dpi - <xsl:value-of select="data [@alias = 'highColour']"/> - <xsl:value-of select="emint:GetFileSize(((data [@alias = 'umbracoBytes'] div 1024) div 1024))" />&nbsp;- <span style="text-transform:uppercase;"><xsl:value-of select="data [@alias = 'umbracoExtension']"/></span>)</span>
    </p>
    </xsl:if>
    <!-- END LOW RES IMAGE CODE -->
    <!-- THIS IS THE HIGH RES IMAGE CODE -->
    <xsl:if test="$imageNode/data [@alias = 'umbracoFile'] != ''">
    <p>
    <a style="float:left" href="{$imageNode/data [@alias = 'umbracoFile']}" title="High resolution image">
    <xsl:attribute name="class">download</xsl:attribute>
    High resolution image</a> <span>(<xsl:value-of select="data [@alias = 'umbracoWidth']"/> x <xsl:value-of select="data [@alias = 'umbracoHeight']"/> px @ <xsl:value-of select="data [@alias = 'highResolution']"/> - <xsl:value-of select="data [@alias = 'highColour']"/> - <xsl:value-of select="emint:GetFileSize(((data [@alias = 'umbracoBytes'] div 1024) div 1024))" />&nbsp;- <span style="text-transform:uppercase;"><xsl:value-of select="data [@alias = 'umbracoExtension']"/></span>)</span>
    </p>
    </xsl:if>
    <!-- END HIGH RES IMAGE CODE -->
    </div>
    <div class="downloadInfo">
    <p>To download files to your computer; right (or Control) click the link and select 'Save target as' (Windows) or 'Download linked file' (Mac). Images are to be used for Brand Toolbox<sup>&#174;</sup> purposes only.</p>
    </div>
    </div>
    </xsl:template>
    <msxsl:script language="C#" implements-prefix="emint">
    <![CDATA[public string GetExtension(string fileName)
    {
    string[] terms = fileName.Split('.');
    if (terms.Length <= 0)
    {
    return string.Empty;
    }
    return terms[terms.Length -1];
    }

    public string GetFileName(string fileName)
    {
    string[] terms = fileName.Split('/');
    if (terms.Length <= 0)
    {
    return string.Empty;
    }
    return terms[terms.Length -1];
    }

    public string GetFileSize(Decimal mbs)
    {
    Decimal result = Decimal.Round(mbs, 2);
    if (result == 0)
    {
    result = mbs * 1024;
    return Decimal.Round(result, 2).ToString() + " KB";
    }
    return result.ToString() + " MB";
    }

    public string GetCentimeters(Decimal pix)
    {
    Decimal formula = (decimal)0.026458333;
    Decimal result = pix * formula;
    return Decimal.Round(result,0).ToString();
    }]]>
    </msxsl:script>
    </xsl:stylesheet>

  • syn-rg 282 posts 425 karma points
    May 25, 2011 @ 01:54
    syn-rg
    0

    Took a bit of time but  I figured it out:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [
    <!ENTITY nbsp "&#x00A0;">]>
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:memberGroupFunctions="urn:memberGroupFunctions"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    xmlns:emint="urn:my-scripts"
    exclude-result-prefixes="msxml umbraco.library">
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:variable name="divOpen"><xsl:text>&lt;div class="image_padding nitroGallery"&gt;</xsl:text></xsl:variable>
    <xsl:variable name="divClose"><xsl:text>&lt;/div&gt;</xsl:text></xsl:variable>
    <xsl:template match="/">
    <!-- start writing XSLT -->
    </xsl:template>
    <xsl:template name="imageTemplate">
    <xsl:param name="imageNode"/>
    <xsl:param name="imageCurrentPageNumber"/>
    <xsl:param name="imageRecordsPerPage"/>

    <xsl:variable name="firstRecordIndex" select="(number($imageCurrentPageNumber) * number($imageRecordsPerPage)) + 1" />
    <xsl:if test="(position() - 1) mod 4 = 0 and position() &gt; $firstRecordIndex">
    <xsl:value-of select="$divClose" disable-output-escaping="yes"/>
    </xsl:if>
    <xsl:if test="(position() - 1) mod 4 = 0 or position() = $firstRecordIndex">
    <xsl:value-of select="$divOpen" disable-output-escaping="yes"/>
    </xsl:if>

    <div>
    <xsl:if test="position() mod 4 &gt; 0">
    <xsl:attribute name="class">image_1-3</xsl:attribute>
    </xsl:if>
    <xsl:if test="position() mod 4 = 0">
    <xsl:attribute name="class">image_4</xsl:attribute>
    </xsl:if>

    <xsl:variable name="mediaId" select="number($imageNode/data[@alias='imageGalleryPhoto'])" />
    <xsl:if test="$mediaId">
    <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
    <xsl:if test="$mediaNode/data">
    <xsl:if test="string($mediaNode/data[@alias='umbracoFile']) != ''">
    <a href="{concat(substring-before($mediaNode/data [@alias='umbracoFile'],'.'), '_thumb_320.jpg')}" rel="lightbox" title="{$imageNode/@nodeName}" id="aimage{$imageNode/@id}">
    <img src="{concat(substring-before($mediaNode/data[@alias='umbracoFile'],'.'), '_thumb_142.jpg')}" alt="[image]" border="0" />
    </a>
    </xsl:if>
    </xsl:if>
    </xsl:if>

    <div style="display:none" rel="lightbox" id="divaimage{$imageNode/@id}">
    <xsl:call-template name="imageDetailsTemplate">
    <xsl:with-param name="imageNode" select="."/></xsl:call-template>
    </div>
    <xsl:if test="$mediaId">
    <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
    <xsl:if test="$mediaNode/data">
    <xsl:if test="string($mediaNode/data[@alias='umbracoFile']) != ''">
    <a href="{concat(substring-before($mediaNode/data [@alias='umbracoFile'],'.'), '_thumb_320.jpg')}" rel="lightbox" title="{$imageNode/@nodeName}" id="aimage{$imageNode/@id}">
    <xsl:value-of select="$imageNode/@nodeName"/>
    </a>
    </xsl:if>
    </xsl:if>
    </xsl:if>
    <xsl:if test="./data [@alias = 'imageLicType'] = 'talent fees apply'">
    <span class="TalentFeesApply">(talent fees apply)</span>
    </xsl:if>
    <xsl:if test="./data [@alias = 'imageLicType'] = 'royalty free'">
    <span class="RoyaltyFree">(royalty free)</span>
    </xsl:if>
    <xsl:if test="./data [@alias = 'imageLicType'] ='other'">
    <span class="RoyaltyFreeOther">(<xsl:value-of select="./data [@alias = 'other']/text()"/>)</span>
    </xsl:if>
    </div>


    <xsl:if test="position() = last()">
    <xsl:value-of select="$divClose" disable-output-escaping="yes"/>
    </xsl:if>
    </xsl:template>
    <xsl:template name="imageDetailsTemplate">
    <xsl:param name="imageNode"/>
    <div class="Details">
    <div id="left">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top" width="100"><p style="text-align:right"><strong>Image&nbsp;number:</strong></p></td>
    <td valign="top"><p><xsl:value-of select="$imageNode/@nodeName" disable-output-escaping="yes" /></p></td>
    </tr>
    <xsl:if test="$imageNode/data [@alias = 'imageLicType'] != ''">
    <tr>
    <td valign="top"><p style="text-align:right"><strong>License&nbsp;type:</strong></p></td>
    <td valign="top"><p><xsl:if test="$imageNode/data [@alias = 'imageLicType'] = 'other'">
    <xsl:value-of select="$imageNode/data [@alias = 'other']" />
    </xsl:if>
    <xsl:if test="$imageNode/data [@alias = 'imageLicType'] != ''">
    <span>
    <xsl:if test="$imageNode/data [@alias = 'imageLicType'] = 'other'"> <xsl:attribute name="class">fineDetailOther</xsl:attribute> </xsl:if>
    <xsl:if test="$imageNode/data [@alias = 'imageLicType'] = 'talent fees apply'"> <xsl:attribute name="class">fineDetailRed</xsl:attribute> </xsl:if>
    <xsl:value-of select="$imageNode/data [@alias = 'imageLicType']" />
    </span>
    </xsl:if>
    </p>
    </td>
    </tr>
    </xsl:if>
    <tr>
    <td valign="top"><p style="text-align:right"><strong>Category:</strong></p></td>
    <td valign="top"><p><xsl:value-of select="$imageNode/parent::node/@nodeName" disable-output-escaping="yes" /></p></td>
    </tr>
    <xsl:variable name="mediaId" select="number($imageNode/data[@alias='imageGalleryPhoto'])" />
    <xsl:if test="$mediaId">
    <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
    <xsl:if test="$mediaNode/data">
    <xsl:if test="string($mediaNode/data [@alias = 'dateTaken']) != ''">
    <tr>
    <td valign="top"><p style="text-align:right"><strong>Date taken:</strong></p></td>
    <td valign="top"><p><xsl:value-of select="$mediaNode/data [@alias = 'dateTaken']"/></p>
    </td>
    </tr>
    </xsl:if>
    </xsl:if>
    </xsl:if>
    <xsl:if test="$imageNode/data [@alias = 'imageDescription'] != ''">
    <tr>
    <td valign="top"><p style="text-align:right"><strong>Description:</strong></p></td>
    <td valign="top"><p><xsl:value-of select="data [@alias = 'imageDescription']"/></p>
    </td>
    </tr>
    </xsl:if>
    <xsl:if test="$imageNode/data [@alias = 'keywords'] != ''">
    <tr>
    <td valign="top"><p style="text-align:right"><strong>Keywords:</strong></p></td>
    <td valign="top"><p><xsl:value-of select="data [@alias = 'keywords']"/></p>
    </td>
    </tr>
    </xsl:if>
    </table>
    </div>
    <div id="right">
    <h1>Download</h1>
    <!-- THIS IS THE LOW RES IMAGE CODE -->
    <xsl:variable name="mediaId" select="number($imageNode/data[@alias='imageGalleryPhoto'])" />
    <xsl:if test="$mediaId">
    <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
    <xsl:if test="$mediaNode/data">
    <xsl:if test="string($mediaNode/data[@alias='umbracoFile']) != ''">
    <p>
    <a href="{concat(substring-before($mediaNode/data [@alias='umbracoFile'],'.'), '_thumb_1024.jpg')}" title="Low resolution image">
    <xsl:attribute name="class">download</xsl:attribute>
    Low resolution image</a> <span>(<xsl:value-of select="emint:GetThumbailFileDimensionWidth(1024, $mediaNode/data [@alias = 'umbracoHeight'] div 1, $mediaNode/data [@alias = 'umbracoWidth'] div 1)"/> x <xsl:value-of select="emint:GetThumbailFileDimensionHeight(1024, $mediaNode/data [@alias = 'umbracoHeight'] div 1, $mediaNode/data [@alias = 'umbracoWidth'] div 1)"/> px @ 96 dpi - <xsl:value-of select="data [@alias = 'highColour']"/> - <xsl:value-of select="emint:GetFileSize(((memberGroupFunctions:GetFileSize(concat(substring-before($mediaNode/data [@alias='umbracoFile'],'.'), '_thumb_1024.jpg')) div 1024) div 1024))" />&nbsp;- <span style="text-transform:uppercase;"><xsl:value-of select="$mediaNode/data [@alias = 'umbracoExtension']"/></span>)</span>
    </p>
    </xsl:if>
    </xsl:if>
    </xsl:if>
    <!-- END LOW RES IMAGE CODE -->
    <!-- THIS IS THE HIGH RES IMAGE CODE -->
    <xsl:if test="$mediaId">
    <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
    <xsl:if test="$mediaNode/data">
    <xsl:if test="string($mediaNode/data[@alias='umbracoFile']) != ''">
    <p>
    <a style="float:left" href="{$mediaNode/data [@alias = 'umbracoFile']}" title="High resolution image">
    <xsl:attribute name="class">download</xsl:attribute>
    High resolution image</a> <span>(<xsl:value-of select="$mediaNode/data [@alias = 'umbracoWidth']"/> x <xsl:value-of select="$mediaNode/data [@alias = 'umbracoHeight']"/> px @ <xsl:if test="$mediaNode/data [@alias = 'horizontalResolution'] != ''"><xsl:value-of select="$mediaNode/data [@alias = 'horizontalResolution']"/> dpi</xsl:if><xsl:if test="$imageNode/data [@alias = 'highResolution'] != ''"><xsl:value-of select="data [@alias = 'highResolution']"/></xsl:if> - <xsl:value-of select="data [@alias = 'highColour']"/> - <xsl:value-of select="emint:GetFileSize((($mediaNode/data [@alias = 'umbracoBytes'] div 1024) div 1024))" />&nbsp;- <span style="text-transform:uppercase;"><xsl:value-of select="$mediaNode/data [@alias = 'umbracoExtension']"/></span>)</span>
    </p>
    </xsl:if>
    </xsl:if>
    </xsl:if>
    <!-- END HIGH RES IMAGE CODE -->
    </div>
    <div class="downloadInfo">
    <p>To download files to your computer; right (or Control) click the link and select 'Save target as' (Windows) or 'Download linked file' (Mac). Images are to be used for Brand Toolbox<sup>&#174;</sup> purposes only.</p>
    </div>
    </div>
    </xsl:template>
    <msxsl:script language="C#" implements-prefix="emint">
    <![CDATA[public string GetExtension(string fileName)
    {
    string[] terms = fileName.Split('.');
    if (terms.Length <= 0)
    {
    return string.Empty;
    }
    return terms[terms.Length -1];
    }

    public string GetFileName(string fileName)
    {
    string[] terms = fileName.Split('/');
    if (terms.Length <= 0)
    {
    return string.Empty;
    }
    return terms[terms.Length -1];
    }

    public string GetFileSize(Decimal mbs)
    {
    Decimal result = Decimal.Round(mbs, 2);
    if (result == 0)
    {
    result = mbs * 1024;
    return Decimal.Round(result, 2).ToString() + " KB";
    }
    return result.ToString() + " MB";
    }

    public Decimal GetThumbailSizeRatio(Decimal thumbnailSize, Decimal height, Decimal width)
    {
    Decimal ratio;
    if (height >= width)
    {
    ratio = height / thumbnailSize;
    }
    else
    {
    ratio = width / thumbnailSize;
    }
    return ratio;
    }

    public string GetThumbailFileDimensionHeight(Decimal thumbnailSize, Decimal height, Decimal width)
    {
    Decimal ratio = GetThumbailSizeRatio(thumbnailSize, height, width);
    return Decimal.Round((height / ratio), 0).ToString();
    }

    public string GetThumbailFileDimensionWidth(Decimal thumbnailSize, Decimal height, Decimal width)
    {
    Decimal ratio = GetThumbailSizeRatio(thumbnailSize, height, width);
    return Decimal.Round((width/ ratio), 0).ToString();
    }

    public string GetCentimeters(Decimal pix)
    {
    Decimal formula = (decimal)0.026458333;
    Decimal result = pix * formula;
    return Decimal.Round(result,0).ToString();
    }]]>
    </msxsl:script>
    </xsl:stylesheet>
  • Sean Holmesby 61 posts 82 karma points
    May 25, 2011 @ 06:41
    Sean Holmesby
    0

    So just to confirm (for others who view this post)... The change you needed to make was to was to change this:-
    <xsl:value-of select="$imageNode/data [@alias='umbracoFile']" />

    to this:-

    <xsl:variable name="mediaId" select="number($imageNode/data[@alias='imageGalleryPhoto'])" />
    <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
    <xsl:value-of select="$mediaNode/data[@alias='umbracoFile']">

    to make your new MediaPicker field 'imageGalleryPhoto' work.

Please Sign in or register to post replies

Write your reply to:

Draft