Copied to clipboard

Flag this post as spam?

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


  • hervey 2 posts 22 karma points
    Dec 02, 2011 @ 19:38
    hervey
    0

    slideshow: how to insert link on a slide

    hello, my question is I am using the slideshow and I am only using images, no text. However, there is no option to setup a link on that image. I guess this should be done in the .xslt file, right? Not sure what code I should enter (rookie here!). Thanks afor your help!

  • Rasmus Berntsen 215 posts 253 karma points c-trib
    Dec 03, 2011 @ 01:51
    Rasmus Berntsen
    0

    Hi Hervey!

    Could you please post the xslt here, then I'm sure that I -or someone else- would be able to guide you in the right direction. :)

  • hervey 2 posts 22 karma points
    Dec 05, 2011 @ 17:05
    hervey
    0

    Here it is:

     

    <?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:variable name="nodeIds" select="umbraco.library:Split($currentPage/slideshow,',')" />

        <div id="slideshow">
          <ul>
            <xsl:for-each select="$nodeIds/value">
              <li class="rotating-panel fc">
                <xsl:if test="position() > 1">
                  <xsl:attribute name="style">display:none;</xsl:attribute>
                </xsl:if>
                <xsl:variable name="slide" select="umbraco.library:GetXmlNodeById(current()/.)"/>
                <img class="fl" alt="{$slide/@nodeName}" src="{$slide/mainImage}"/>
                <div class="">
                  <xsl:value-of select="$slide/bodyText" disable-output-escaping="yes"/>
                </div>
              </li>
            </xsl:for-each>
          </ul>
          <ul id="slidePager">
            <xsl:for-each select="$nodeIds/value">
              <li>
                <a href="?position={position()}">
                  <xsl:if test="position() = 1">
                    <xsl:attribute name="class">selected</xsl:attribute>
                  </xsl:if>
                  <xsl:value-of select="position()"/>
                </a>
              </li>
            </xsl:for-each>
          </ul>

        </div>

      </xsl:template>

    </xsl:stylesheet>

     

    Many thanks!

  • Jeroen Breuer 4909 posts 12266 karma points MVP 6x admin c-trib
    Dec 05, 2011 @ 17:28
    Jeroen Breuer
    0

    If you want to use Razor you can have a look at the Cultiv Razor Examples project. It's a complete website which also contains a slide show.

    Jeroen

  • 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.

Please Sign in or register to post replies