Copied to clipboard

Flag this post as spam?

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


  • Jim Lesinski 32 posts 54 karma points
    Aug 13, 2010 @ 19:10
    Jim Lesinski
    1

    An adjustment to the 4.5.1 XSLT

    I noticed a couple issues in the 4.5.1 XSLT that I fixed. Unfortunately the converter doesn't always work so there were still a few issues. 

    <xsl:variable name="thisFolder" select="/macro/rotateFolder/node/@id"/>    
    becomes
    <xsl:variable name="thisFolder" select="/macro/rotateFolder/Folder/@id"/> 

    and 

    <xsl:for-each select="umbraco.library:GetMedia($thisFolder, 'true')/* [@isDoc]">
    becomes
    <xsl:for-each select="umbraco.library:GetMedia($thisFolder, 'true')/Image">

     

    Here is the full XSLT if you want to update your file:

    =====================================================================

    <?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" xmlns:tagsLib="urn:tagsLib" xmlns:BlogLibrary="urn:BlogLibrary" xmlns:CWSHelper.twitter="urn:CWSHelper.twitter"

    exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets tagsLib BlogLibrary CWSHelper.twitter ">

     

     

    <xsl:output method="xml" omit-xml-declaration="yes"/>

     

     

    <xsl:param name="currentPage"/>

     

    <xsl:template match="/">

     

    <!-- start writing XSLT -->

    <xsl:variable name="thisFolder" select="/macro/rotateFolder/Folder/@id"/> <!-- hard coded 2670 -->

     

    <xsl:value-of select="umbraco.library:AddJquery()"/>

    <xsl:value-of select="umbraco.library:RegisterJavaScriptFile('jqCycle', '/scripts/cycle.js')"/>

    <xsl:value-of select="umbraco.library:RegisterJavaScriptFile('jqGoogle', 'http://cdn.jquerytools.org/1.1.2/tiny/jquery.tools.min.js')"/>

    <xsl:value-of select="umbraco.library:RegisterJavaScriptFile('mttRotate', '/scripts/mtt_rotatePro.js')"/>

     

    <xsl:value-of select="umbraco.library:RegisterStyleSheetFile('mttRotateCSS', ' /css/mtt_rotatePro.css ')"/>

     

    <xsl:if test="$thisFolder != ''">

    <div id="rotateWrap">

    <xsl:variable name="images" select="number($thisFolder)"/>

    <!-- rotator markup -->

    <div id="rotatorMain">

    <xsl:for-each select="umbraco.library:GetMedia($thisFolder, 'true')/Image">

    <xsl:variable name="picFile" select="./umbracoFile"/>

    <xsl:variable name="picAlt" select="@nodeName"/>

    <xsl:variable name="toolTip" select="./toolTipText"/>

     

    <div class="main_image"> <img src="{$picFile}" alt="{$picAlt}" title="{$toolTip}"/>

    <div class="desc">

    <div class="block">

    <h2><xsl:value-of select="./picHeader"/></h2>

    <small><xsl:value-of select="umbraco.library:FormatDateTime(./storyDate, 'D')"/></small>

    <xsl:value-of select="./storyTeaser" disable-output-escaping="yes"/>

    </div>

    </div>

    </div>

    </xsl:for-each>

    </div><!-- end rotator main -->

    <!-- the tooltips -->

    <div id="demotip">&nbsp;</div>

    <div id="carousel_container">

    <div id="carousel_inner">

    <ul id="carousel_ul">

    </ul>

    </div>

    <div class="clearDiv">&nbsp;</div>

    <input type='hidden' id='hidden_auto_slide_seconds' value='0' />

    </div>

    <div class="clearDiv">&nbsp;</div>

    <div id="viewMoreNews"><a href="#">More News Articles</a></div>

    <div class="clearDiv">&nbsp;</div>

    </div><!-- end rotator markup -->

    </xsl:if>

    </xsl:template>

     

    </xsl:stylesheet>

  • bob baty-barr 1180 posts 1294 karma points MVP
    Aug 16, 2010 @ 17:16
    bob baty-barr
    0

    thanks for the help!

    i will add this officially to the package as soon as i can this week.

  • bob baty-barr 1180 posts 1294 karma points MVP
    Aug 18, 2010 @ 15:59
    bob baty-barr
    0

    Jim,

    thanks i have updated the download file to include your fixes!

    i wish i could give you a solve karma, but i did give you a high five!

Please Sign in or register to post replies

Write your reply to:

Draft