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
Hi,
Just changed my Umbraco 4.0.3 to 4.5.2 and now one of my xslt scripts doesn't work.Basically I pick an image from the media library and via xslt I display that image.
XSLT:
<xsl:if test="string($currentPage/ancestor-or-self::node/data [@alias='homepageLogo']) != '' ">
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="umbraco.library:GetMedia($currentPage/ancestor-or-self::node/data[@alias='homepageLogo'], 'false')/data [@alias = 'umbracoFile']"/>
On the document type I create an property: homepageLogo, type: media picker and off course inserting the macro to the template - and that's it.
But nothing comes out of the xslt - any thoughts?
Rgds
Brian
Try this:
<xsl:if test="string($currentPage/ancestor-or-self::*/homepageLogo != '' "> <xsl:element name="img"> <xsl:attribute name="src"> <xsl:value-of select="umbraco.library:GetMedia($currentPage/ancestor-or-self::*/homepageLogo, 'false')/umbracoFile"/>
Ahhh! Thanks a million!
There is an online translator from the old to the new schema:
http://blackpoint.dk/umbraco-workbench/tools/convert-xml-schema-to-45-.aspx?p=2
Some bugs exist but it should help you on your way.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
XSLT can't display property
Hi,
Just changed my Umbraco 4.0.3 to 4.5.2 and now one of my xslt scripts doesn't work.
Basically I pick an image from the media library and via xslt I display that image.
XSLT:
On the document type I create an property: homepageLogo, type: media picker and off course inserting the macro to the template - and that's it.
But nothing comes out of the xslt - any thoughts?
Rgds
Brian
Try this:
Ahhh! Thanks a million!
There is an online translator from the old to the new schema:
http://blackpoint.dk/umbraco-workbench/tools/convert-xml-schema-to-45-.aspx?p=2
Some bugs exist but it should help you on your way.
is working on a reply...