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
Hello Everyone,
For some time now i've been reusing the same xslt script to get the url from a media picker property. This is the code i'm using:
<xsl:variable name="mediaId" select="number(rowPicture)" /> <xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" /> <img src="{$mediaNode/umbracoFile}" />
This used to work, but now in 7.4.3, i'm getting this value:
<img src="{src: '/media/1002/test.jpg', crops: []}" />
Did this recently change, and is there another way/property for getting a media picker url ?
thanks, Pedro
Hi Setii,
I came across your question whilst also looking to solve this problem.
I solved it by using the following code:
var mediaNode = new UmbracoHelper(UmbracoContext.Current).TypedMedia(mediaId); return mediaNode.Url;
You should be able to use this and apply to your xslt!
Also this link may help: https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/image-cropper
Hope this helps,
Laith
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
UmbracoFile in XSLT
Hello Everyone,
For some time now i've been reusing the same xslt script to get the url from a media picker property. This is the code i'm using:
This used to work, but now in 7.4.3, i'm getting this value:
Did this recently change, and is there another way/property for getting a media picker url ?
thanks, Pedro
Hi Setii,
I came across your question whilst also looking to solve this problem.
I solved it by using the following code:
You should be able to use this and apply to your xslt!
Also this link may help: https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/image-cropper
Hope this helps,
Laith
is working on a reply...