Copied to clipboard

Flag this post as spam?

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


  • Phil Crowe 192 posts 256 karma points
    Apr 30, 2010 @ 10:58
    Phil Crowe
    0

    if property equals this

    Im trying to determine if a document property called "linktoasp" contains a specific value if it does it needs to use an iframe with a different css class. Any ideas why this isnt working???

     

    <xsl:choose>

     

     

    <xsl:when test="string-length($currentPage/data[@alias='linkToASP']) &gt; 0">

    <div style="text-align:center; border:none;">

    <iframe src ="{$currentPage/data[@alias='linkToASP']}"  scrolling="no" class="IframeStyle" frameBorder="0">

       <p>Your browser does not support iframes.</p>

    </iframe>

    </div>

    </xsl:when>

     

    <xsl:when test="string($currentPage/data[@alias='linkToASP']) = 'http://blazes-old.sass.local/fire-place.asp'">

    <div style="text-align:center; border:none;">

    <iframe src ="{$currentPage/data[@alias='linkToASP']}"  scrolling="no" class="IframeStyleSpecialOffers" frameBorder="0">

       <p>Your browser does not support iframes.</p>

    </iframe>

    </div>

    </xsl:when>

    <xsl:otherwise>

     

    </xsl:otherwise>

    </xsl:choose>

  • Tobias Neugebauer 52 posts 93 karma points
    Apr 30, 2010 @ 11:02
    Tobias Neugebauer
    1

    Hi,

    maybe you should yust switch statements since the second case is also true for the first one... Try it this way:

     

    <xsl:when test="string($currentPage/data[@alias='linkToASP']) = 'http://blazes-old.sass.local/fire-place.asp'">

    <div style="text-align:center; border:none;">

    <iframe src ="{$currentPage/data[@alias='linkToASP']}"  scrolling="no" class="IframeStyleSpecialOffers" frameBorder="0">

       <p>Your browser does not support iframes.</p>

    </iframe>

    </div>

    </xsl:when>

    <xsl:when test="string-length($currentPage/data[@alias='linkToASP']) &gt; 0">

    <div style="text-align:center; border:none;">

    <iframe src ="{$currentPage/data[@alias='linkToASP']}"  scrolling="no" class="IframeStyle" frameBorder="0">

       <p>Your browser does not support iframes.</p>

    </iframe>

    </div>

    </xsl:when>

     Cheers, Toby

  • Phil Crowe 192 posts 256 karma points
    Apr 30, 2010 @ 11:13
    Phil Crowe
    0

    thanks toby!

  • 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