質問

私は次のマークアップを持っています:

<ul id="slider">    
    <!-- slider item -->
    <li>
        ...
    </li>
    <!-- end of slider item -->
</ul>

そして、次のXSLを定義しました header.xslitemStyle.xsl SharePoint 2010リストからデータを表示するには:

<!-- in header.xsl -->
<xsl:template name="Slider" match="*[@GroupStyle='Slider']" mode="header">
    <ul id="slider">
    </ul>
</xsl:template>

<!-- in itemStyle.xsl -->
<xsl:template name="Slider" match="Row[@Style='Slider']" mode="itemstyle">
    <xsl:variable name="SafeImageUrl">
        <xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
            <xsl:with-param name="UrlColumnName" select="@Picture"/>
        </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="Title">
        <xsl:call-template name="OuterTemplate.GetTitle">
            <xsl:with-param name="Title" select="@Title" />
        </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="Details">
        <xsl:call-template name="OuterTemplate.GetTitle">
            <xsl:with-param name="Title" select="@Details" />
        </xsl:call-template>
    </xsl:variable>
    <li>
        <img src="{$SafeImageUrl}" alt="{$Title}" />
        <section class="media-description">
            <h2 class="slider-headline"><xsl:value-of  disable-output-escaping="yes" select="$Title" /></h2>
            <p><xsl:value-of disable-output-escaping="yes" select="$Details" /></p>
        </section>
    </li>
</xsl:template>

しかし、事は、私が欲しいということです ul それらを包む要素 li's 直接、上記のマークアップに示すように、どうすればそれを行うことができますか?それとも、それを達成するためのより良い方法はありますか?

役に立ちましたか?

解決

header.xslの代わりにULSをContentQueryMain.xsl内に入れます

ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top