Copied to clipboard

Flag this post as spam?

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


  • Morten 3 posts 23 karma points
    Jun 02, 2010 @ 09:57
    Morten
    0

    Variables

    Hi.

    Bet this is simple, but being a newbie I'm stuck.

    Full xslt below.

    I need to swap the ID number (1602) with the content of a textstring from this field <xsl:value-of select="data [@alias = 'sliderpixfolder']"/>

     

    so.addVariable('file','?alttemplate=simpleRotatorXML%26folderID=1602');

    But how..?
    I've tried severeal possible solutions, but apperantly not the right one.

     

    Thanks for your help.

    Best,

    Morten

     

     

    <?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"

                                 exclude-result-prefixes="msxml umbraco.library">

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

     <xsl:param name="currentPage"/>

     <xsl:template match="/">

     <!-- start writing XSLT -->

    <div style="float:right;"><div id="player"> replace this text </div><script type="text/javascript">

                                 var so = new SWFObject('/media/2/imagerotator.swf','mpl','300','207','3');

                                                                                           so.addParam('allowfullscreen','true');

                                    so.addParam('allowscriptaccess','true');

                                                                                                                        so.addParam("wmode","transparent");

                                                                                                                        so.addVariable('autostart' , 'true');

                                                                                                                        so.addVariable('transition','fade');

                                                                                                                        so.addVariable('rotatetime', '3');

                                                                                                                        so.addVariable('shuffle', 'false');

                                                                                                                        so.addVariable('usecaptions', 'false');

                                                                                                                         so.addVariable('file','?alttemplate=simpleRotatorXML%26folderID=1602');

                                                                                                                        so.addVariable('shownavigation', 'false');

                                                                                                                        so.addVariable('overstretch','true');

                                                         so.addVariable('height','207');

                                    so.addVariable('width','300');

                                    so.write('player'); 

                </script>

    </div>

    </xsl:template>

    </xsl:stylesheet>

     

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Jun 02, 2010 @ 10:40
    Dirk De Grave
    0

    HI Morten,

    use the concat function to create the string:

    <xsl:value-of select="concat('?alttemplate=simpleRotatorXML%26folderID=',$currentPage/data [@alias = 'sliderpixfolder'])" />

     

    Hope this helps.

    Regards,

    /Dirk

  • Morten 3 posts 23 karma points
    Jun 02, 2010 @ 11:00
    Morten
    0

    Excactly!

     

    Thanks a lot..

  • 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