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
OK, here's what I've got so far-
That is setting the background URL as the media ID of the image. I know I probably need to use GetMedia, but the precise syntax is eluding me.
I would appreciate your assistance.
<xsl:for-each select="umbraco.library:GetXmlNodeById('3160')/* [@isDoc and string(umbracoNaviHide) != '1']"> <div id="fr{@id}" class="featuredbg ui-tabs-panel {./fragmentCSSClass}" style="background: url('{./backgroundImage}')"> <div class="info {./infoDivCSSClass}"> <xsl:value-of select="./sliderContent" disable-output-escaping="yes" /> </div> </div></xsl:for-each>
I gave up and used an Upload data type instead of a media picker. If anybody does know, I would still be interested.
Hello :) GetMedia works like this :).
<xsl:variablename="mediaNode"select="umbraco.library:GetMedia($mediaId, 0)"/>
<
xsl:variable
name
=
"mediaNode"
select
"umbraco.library:GetMedia($mediaId, 0)"
/>
you can then use:
$mediaNode/umbracoFile, $mediaNode/umbracoWidth, $UmbracoHeight and other properties. Hope this helps :)
Charlie.
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
Setting div background image as inline style in macro, getting URL of image from media picker rather than media id
OK, here's what I've got so far-
That is setting the background URL as the media ID of the image. I know I probably need to use GetMedia, but the precise syntax is eluding me.
I would appreciate your assistance.
<xsl:for-each select="umbraco.library:GetXmlNodeById('3160')/* [@isDoc and string(umbracoNaviHide) != '1']">
<div id="fr{@id}" class="featuredbg ui-tabs-panel {./fragmentCSSClass}" style="background: url('{./backgroundImage}')">
<div class="info {./infoDivCSSClass}">
<xsl:value-of select="./sliderContent" disable-output-escaping="yes" />
</div>
</div>
</xsl:for-each>
I gave up and used an Upload data type instead of a media picker. If anybody does know, I would still be interested.
Hello :) GetMedia works like this :).
<
xsl:variable
name
=
"mediaNode"
select
=
"umbraco.library:GetMedia($mediaId, 0)"
/>
you can then use:
$mediaNode/umbracoFile, $mediaNode/umbracoWidth, $UmbracoHeight and other properties. Hope this helps :)
Charlie.
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.