Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Have changed the xslt schema from
<xsl:attribute name="src">
<xsl:value-of select="umbraco.library:GetMedia(data[@alias = 'navigationImage'], 'false')/data"/>
</xsl:attribute>
to
<xsl:value-of select="umbraco.library:GetMedia(navigationImage, 'false')/data"/>
but the url data is fetched.
Details from umbraco.config file
<node id="5934" version="d455c71b-f274-4aee-beeb-a7f698be9593" parentID="5933" level="3" writerID="0" creatorID="12" nodeType="1872" template="0" sortOrder="1" createDate="2009-11-16T10:11:12" updateDate="2010-07-12T15:28:24" nodeName="netflights-logo" urlName="netflights-logo" writerName="Administrator" creatorName="Jonathan Percy" nodeTypeAlias="NavigationItem" path="-1,1873,5933,5934">
<data alias="pageId">1261</data>
<data alias="seoFooterHtml"><![CDATA[]]></data>
<data alias="url">
</data>
<data alias="openInNewWindow">0</data>
<data alias="ExcludeSitemap">0</data>
<data alias="navigationImage">5932</data>
<data alias="navigationImageAltText">Netflights</data>
</node>
Please advice.
Looks almost ok. I use <xsl:value-of select="umbraco.library:GetMedia(navigationImage, 'false')"/>
If the image is on the currentpage you can use: <xsl:value-of select="umbraco.library:GetMedia($currentPage/navigationImage, 'false')"/>
Hi Ashok
The XML that you provided is the old one. Not the new schema used in v4.5.x.
Could you try having a look in your umbracoSettings.config and see if the value in the <UseLegacyXmlSchema> is set to false?
If that's the case please try to republish the whole website.
When you are working with the new XML schema, you should be able to grab the source to an image like this:
<xsl:value-of select="umbraco.library:GetMedia($currentPage/navigationImage, 0)/umbracoFile" />
I hope the above makes sense :)
/Kim A
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Problem with umbraco.library:GetMedia() in 4.5.2
Have changed the xslt schema from
<xsl:attribute name="src">
<xsl:value-of select="umbraco.library:GetMedia(data[@alias = 'navigationImage'], 'false')/data"/>
</xsl:attribute>
to
<xsl:attribute name="src">
<xsl:value-of select="umbraco.library:GetMedia(navigationImage, 'false')/data"/>
</xsl:attribute>
but the url data is fetched.
Details from umbraco.config file
<node id="5934" version="d455c71b-f274-4aee-beeb-a7f698be9593" parentID="5933" level="3" writerID="0" creatorID="12" nodeType="1872" template="0" sortOrder="1" createDate="2009-11-16T10:11:12" updateDate="2010-07-12T15:28:24" nodeName="netflights-logo" urlName="netflights-logo" writerName="Administrator" creatorName="Jonathan Percy" nodeTypeAlias="NavigationItem" path="-1,1873,5933,5934">
<data alias="pageId">1261</data>
<data alias="seoFooterHtml"><![CDATA[]]></data>
<data alias="url">
</data>
<data alias="openInNewWindow">0</data>
<data alias="ExcludeSitemap">0</data>
<data alias="navigationImage">5932</data>
<data alias="navigationImageAltText">Netflights</data>
</node>
Please advice.
Looks almost ok. I use <xsl:value-of select="umbraco.library:GetMedia(navigationImage, 'false')"/>
If the image is on the currentpage you can use: <xsl:value-of select="umbraco.library:GetMedia($currentPage/navigationImage, 'false')"/>
Hi Ashok
The XML that you provided is the old one. Not the new schema used in v4.5.x.
Could you try having a look in your umbracoSettings.config and see if the value in the <UseLegacyXmlSchema> is set to false?
If that's the case please try to republish the whole website.
When you are working with the new XML schema, you should be able to grab the source to an image like this:
I hope the above makes sense :)
/Kim A
is working on a reply...