Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Natasha 79 posts 195 karma points
    Nov 04, 2013 @ 17:53
    Natasha
    0

    Adding hyperlinks to a slider

    Hi Everyone 

    Can anyone help me to add links to each of these slide?  I have fields called link 1,2 and 3 in the document type (content pickers) and I would like each to linlk to the corresponding slide.  This is my xslt so far

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet 
        version="1.0" 
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
        xmlns:msxml="urn:schemas-microsoft-com:xslt"
        xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" 
        exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
        
        <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:param name="currentPage"/>
        
    <xsl:template match="/">

    <xsl:value-of select="umbraco.library:RegisterJavaScriptFile('jquery.min.js', '//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js')"/>
      <xsl:value-of select="umbraco.library:RegisterJavaScriptFile('bxslider', '/scripts/jquery.bxslider.min.js')"/>
         <script type="text/javascript">
    $(document).ready(function(){
      $('.bxslider').bxSlider({
      auto: true,
      autoControls: false,
    speed:3000  
    });
    }); 
    </script>    
       <div class="bxslider">
    <xsl:for-each select="$currentPage/*[starts-with(name(),'slide')]">
     
     <a href="./link"><img src="{umbraco.library:GetMedia(., 0)/umbracoFile}" class="slideimage"/></a>
         
      
    </xsl:for-each>
      </div>
        
           
     
      </xsl:template>
    </xsl:stylesheet>
    Thanks
    Natasha
  • Mitra 81 posts 196 karma points
    Nov 05, 2013 @ 08:31
  • Natasha 79 posts 195 karma points
    Sep 29, 2014 @ 03:46
    Natasha
    0

    Hi There

    I am not that great at Razor is this possible to do in xslt at all??? If not I better start learning it as more of my clients are asking for this

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft