<!-- Input the related links property alias here --> <xsl:variable name="propertyAlias" select="string('frontSlideshow')"/>
<xsl:template match="/">
<!-- The fun starts here --> <ul class="teaser"> <xsl:for-each select="$currentPage/data [@alias = $propertyAlias]/links/link"> <li> <div class="copy"> <h1><xsl:value-of select="umbraco.library:GetMedia(./@link,0)/data[@alias='slideshowHeader']"/><br /><span class="thin"><xsl:value-of select="umbraco.library:GetMedia(./@link,0)/data[@alias='slideshowSubHeader']"/></span></h1> <p><xsl:value-of select="umbraco.library:GetMedia(./@link,0)/data[@alias='slideshowCopy']"/></p> <p><a href="WHAT CODE SHOULD BE INSERTED TO GET THE CONTENT PICKER LINK">THE PROBLEM IS RIGHT HERE!</a></p> </div> <span class="img_bg"> <xsl:element name="img"> <xsl:attribute name="src"> <xsl:value-of select="umbraco.library:GetMedia(./@link,0)/data[@alias='umbracoFile']"/> </xsl:attribute> <xsl:attribute name="alt"> <xsl:value-of select="umbraco.library:GetMedia(./@link,0)/data[@alias='slideshowHeader']"/> </xsl:attribute> </xsl:element> </span> <span class="fade_red"></span> </li> </xsl:for-each> </ul> <!-- Live Editing support for related links. --> <xsl:value-of select="umbraco.library:Item($currentPage/@id,$propertyAlias,'')" />
</xsl:template>
</xsl:stylesheet>
Is there anyone who could tell me that magic code I need, to get a link working through a mediatype?
Thanks for the reply, but it don't work. I need to call
data[@alias='slideshowLink']
in the same line, because this is the one who got the Content Picker with the link information.
If I call the @link only, nothing will appear, and I will return the number on the media link instead of the alias slideshowLink (does it make any sense?)
How to get a link in the media
Hi,
I used this awesome package for a new website, but I have som difficulties setting up a link.
In the mediatype I placed the following:
Name: Link to page
Alias: slideshowLink
Type: Content Picker
Tab: Content
When I choose to create a new media, I choose my new Mediatype "Slideshow", upload a picture and set a link.
Everything works fine except the link. Either I get a error or nothing appears when I try to place the information in XSLT.
Here is the XSLT document:
Is there anyone who could tell me that magic code I need, to get a link working through a mediatype?
Kind regards,
Niels Kristiansen
Hi there, you should be using the following:
or
I think this should do it...
HTH,
Nik
Hi Nik,
Thanks for the reply, but it don't work. I need to call
data[@alias='slideshowLink']
in the same line, because this is the one who got the Content Picker with the link information.
If I call the @link only, nothing will appear, and I will return the number on the media link instead of the alias slideshowLink (does it make any sense?)
Kind regards,
Niels
Hi Niels
In that case I think that you will ned to write
Does this help?
/Jan
Hi Jan,
Unfortunately it didn't work. But in the meantime I found the solution :)
Here it is:
Thanks for the time and replies, both from you and Nik.
Kind regards,
Niels
is working on a reply...