views:

307

answers:

0

Hi, I want to edit ItemStyle.xls so that the CBQW displays images with fixed height and width. But I can't figure out where in the style I should edit this and which attributes to use. Can someone help me out? This is my code:

<xsl:template name="DHVNews" match="Row[@Style='DHVNews']" mode="itemstyle">
    <xsl:variable name="SafeImageUrl">
        <xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
            <xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
        </xsl:call-template>
    </xsl:variable>

    <xsl:variable name="SafeLinkUrl">
        <xsl:call-template name="OuterTemplate.GetSafeLink">
            <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
        </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="DisplayTitle">
        <xsl:call-template name="OuterTemplate.GetTitle">
            <xsl:with-param name="Title" select="@Title"/>
            <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
        </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="LinkTarget">
        <xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
    </xsl:variable>

     <xsl:variable name="ArticleStartDate">
     <xsl:value-of select="ddwrt:FormatDate(string(@ArticleStartDate), 1033, 3)" />
    </xsl:variable>

    <div id="linkitem" class="item">
         <xsl:if test="string-length($SafeImageUrl) != 0">
            <div class="image-area-left">
                <a href="{$SafeLinkUrl}" target="{$LinkTarget}">
                    <img class="image-fixed-width" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}"/>
                </a><br /> <br />
            </div>
        </xsl:if>

        <xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
         <strong><xsl:value-of select="$ArticleStartDate" /></strong>
        &#160;    
       <strong><a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}"><xsl:value-of

select="$DisplayTitle"/>

  <xsl:if test="ddwrt:IfNew(string(@ArticleStartDate))">
            <img src="/_layouts/1033/images/new.gif" alt="New" />
        </xsl:if>

  <div class="description">
                <xsl:value-of select="@Description" /><br />
                 <xsl:value-of select="substring(@PublishingPageContent, 0, 200)" disable-output-escaping="yes"/>
       <a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="Lees meer">Read

more...

   </div>
</xsl:template>

related questions