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 (4.0.3) from
<xsl:attribute name="src">
<xsl:value-of select="umbraco.library:GetMedia(data[@alias = 'navigationImage'], 'false')/data"/>
</xsl:attribute>
to 4.5.2
<xsl:value-of select="umbraco.library:GetMedia(navigationImage, 'false')/data"/>
but the url data is not 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="Test Test" 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">Testing</data>
</node>
Browser output:
<img title="Testing" alt="Testing" src="" id="logo">
Please advice.
The XML in your umbraco.config seems to be the old schema. What happens if you select data[@alias = 'navigationImage'] instead?
Regards,Magnus
Thanks Magnus. You're right, the umbraco.config was the old schema for some reason. I deleted & re-generated it. Now it's looking like this
<NavigationItem id="5934" parentID="5933" level="3" writerID="0" creatorID="12" nodeType="1872" template="0" sortOrder="1" createDate="2009-11-16T10:11:12" updateDate="2010-10-12T15:03:32" nodeName="netflights-logo" urlName="netflights-logo" writerName="Administrator" creatorName="Test Test" path="-1,1873,5933,5934" isDoc="">
<pageId>1261</pageId>
<seoFooterHtml><![CDATA[]]></seoFooterHtml>
<url>
</url>
<openInNewWindow>0</openInNewWindow>
<ExcludeSitemap>0</ExcludeSitemap>
<navigationImage>5932</navigationImage>
<navigationImageAltText>Testing</navigationImageAltText>
</NavigationItem>
but makes no difference.
I also tried
<xsl:value-of select="umbraco.library:GetMedia(navigationImage, 'false')/data[@alias = 'navigationImage']"/>
<xsl:value-of select="umbraco.library:GetMedia(navigationImage, 'false')/umbracoFile"/>
What happens if you replace 'false' with just 0 (no quotes) in your GetMedia call?
Tom - makes no difference.
Ran into the same issue, here's what I did:
- save the image again, and it'll show up.
It'll work, but using this method, you'd be saving all images one by one, which is not an option for large media section. But, umbraco to the rescue. If you're using the new xml schema, browse to http://mysite/umbraco/dialogs/republish.aspx?xml=true (See this reference on the wiki)
Cheers,
/Dirk
Oh, once that's done, your third statement
will work.
And on the performance side of things, output of GetMedia() call will be cached, so faster response times and no more db access for any subsequent call for the same image.
Dirk - you're a star. :) Many thanks mate. Indeed saving the image worked.
I was scratching my head for 3 days on this.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
umbraco.library:GetMedia() in 4.5.2 not returning value
Have changed the xslt schema (4.0.3) from
<xsl:attribute name="src">
<xsl:value-of select="umbraco.library:GetMedia(data[@alias = 'navigationImage'], 'false')/data"/>
</xsl:attribute>
to 4.5.2
<xsl:attribute name="src">
<xsl:value-of select="umbraco.library:GetMedia(navigationImage, 'false')/data"/>
</xsl:attribute>
but the url data is not 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="Test Test" 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">Testing</data>
</node>
Browser output:
<img title="Testing" alt="Testing" src="" id="logo">
Please advice.
The XML in your umbraco.config seems to be the old schema. What happens if you select data[@alias = 'navigationImage'] instead?
Regards,
Magnus
Thanks Magnus. You're right, the umbraco.config was the old schema for some reason. I deleted & re-generated it. Now it's looking like this
<NavigationItem id="5934" parentID="5933" level="3" writerID="0" creatorID="12" nodeType="1872" template="0" sortOrder="1" createDate="2009-11-16T10:11:12" updateDate="2010-10-12T15:03:32" nodeName="netflights-logo" urlName="netflights-logo" writerName="Administrator" creatorName="Test Test" path="-1,1873,5933,5934" isDoc="">
<pageId>1261</pageId>
<seoFooterHtml><![CDATA[]]></seoFooterHtml>
<url>
</url>
<openInNewWindow>0</openInNewWindow>
<ExcludeSitemap>0</ExcludeSitemap>
<navigationImage>5932</navigationImage>
<navigationImageAltText>Testing</navigationImageAltText>
</NavigationItem>
but makes no difference.
I also tried
<xsl:value-of select="umbraco.library:GetMedia(data[@alias = 'navigationImage'], 'false')/data"/>
<xsl:value-of select="umbraco.library:GetMedia(navigationImage, 'false')/data[@alias = 'navigationImage']"/>
What happens if you replace 'false' with just 0 (no quotes) in your GetMedia call?
Tom - makes no difference.
Ran into the same issue, here's what I did:
- save the image again, and it'll show up.
It'll work, but using this method, you'd be saving all images one by one, which is not an option for large media section. But, umbraco to the rescue. If you're using the new xml schema, browse to http://mysite/umbraco/dialogs/republish.aspx?xml=true (See this reference on the wiki)
Cheers,
/Dirk
Oh, once that's done, your third statement
will work.
And on the performance side of things, output of GetMedia() call will be cached, so faster response times and no more db access for any subsequent call for the same image.
/Dirk
Dirk - you're a star. :) Many thanks mate. Indeed saving the image worked.
I was scratching my head for 3 days on this.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.