Copied to clipboard

Flag this post as spam?

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


  • Bas Wensveen 54 posts 75 karma points
    Nov 27, 2010 @ 19:21
    Bas Wensveen
    0

    Hard to describe issue, you have to see it for yourself

    Hi,

    Take a look a www.mckili.nl/locaties.aspx and investigate the generated html. The text under the image should be black but somehow a link is generated and encapsulates the text. The code that generates the image slide show and the text under the image is listed below

    <?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:variable name="documentTypeAlias" select="string('Locatie')"/>
    
        <xsl:template match="/">
    
            <xsl:variable name="rootNode" select="$currentPage/ancestor-or-self::node[last()]" />
    
            <div id="referenties">
    
                <xsl:for-each select="$rootNode/descendant-or-self::node [@nodeTypeAlias = $documentTypeAlias]">
    
                    <div id="referntieItem">
                        <xsl:if test="./data [@alias='locatieFoto1'] != '' ">
                            <a  class="element_groep" rel="groep_ad">
                                <xsl:attribute name="href">
                                    <xsl:value-of select="./data [@alias='locatieFoto2'] "/>
                                </xsl:attribute>
    
                                <img>
                                    <xsl:attribute name="src">
                                        <xsl:text>/umbraco/ImageGen.ashx?image=</xsl:text>
                                        <xsl:value-of select="./data [@alias = 'locatieFoto1'] "/>
                                        <xsl:text>&amp;height=100&amp;compression=100</xsl:text>
                                        <xsl:text>&amp;fontsize=11&amp;fontcolor=white&amp;FontStyle=Bold&amp;align=center"</xsl:text>
                                    </xsl:attribute>
                                    <xsl:attribute name="alt">
                                        <xsl:value-of select="./node/@nodeName"/>
                                    </xsl:attribute>
                                </img>
                            </a>
                        </xsl:if>
                        <xsl:if test="./data [@alias='locatieFoto2'] != '' ">
                            <a class="element_groep" rel="groep_ad">
                                <xsl:attribute name="href">
                                    <xsl:value-of select="./data [@alias='locatieFoto2'] "/>
                                </xsl:attribute>
                            </a>
                        </xsl:if>
    
    
                        <br/>
                        <br/>
                        <xsl:value-of select="./data [@alias = 'bodyText'] " disable-output-escaping="yes"/>
                        <br/>
                        <hr/>
                        <br/>
                    </div>
    
                </xsl:for-each>
    
            </div>
        </xsl:template>
    </xsl:stylesheet>
    
  • jc 64 posts 101 karma points
    Nov 28, 2010 @ 02:24
    jc
    0

    Would this work?:

    Old:

    <xsl:if test="./data [@alias='locatieFoto2'] != '' ">
            <a class="element_groep" rel="groep_ad">
                    <xsl:attribute name="href">
                            <xsl:value-of select="./data [@alias='locatieFoto2'] "/>
                    </xsl:attribute>
            </a>
    </xsl:if>

    New:

    <xsl:if test="./data [@alias='locatieFoto2'] != '' ">
            <p><xsl:value-of select="./data [@alias='locatieFoto2'] "/></p>
    </xsl:if>
  • Bas Wensveen 54 posts 75 karma points
    Nov 28, 2010 @ 13:39
    Bas Wensveen
    0

    Hi Jc,

     

    I need the link for fancybox i suppose. A paragraph won't work.

    Thanks for you suggestion.

    Regards

     

     

  • Kim Andersen 1447 posts 2197 karma points MVP
    Nov 28, 2010 @ 16:57
    Kim Andersen
    0

    To all of the users that might find this post in the future: This issue was answered in the dublicate post right here.

    /Kim A

  • 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