テンプレートを使用してレンダリングに割り当てられた画像を出力しようとしています。しかし、私はそれを介して出力しようとすると何も得られません。ここで画像のSitecore XSLTレンダリングの問題
は私が持っているものです。
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sc="http://www.sitecore.net/sc"
xmlns:dot="http://www.sitecore.net/dot"
exclude-result-prefixes="dot sc">
<!-- output directives -->
<xsl:output method="xml" indent="no" encoding="UTF-8" omit-xml-declaration="yes" />
<!-- parameters -->
<xsl:param name="lang" select="'en'"/>
<xsl:param name="id" select="''"/>
<xsl:param name="sc_item"/>
<xsl:param name="sc_currentitem"/>
<xsl:param name="overrideImage"/>
<!-- variables -->
<xsl:variable name="home" select="$sc_item/ancestor-or-self::item[@template='site root']" />
<!-- entry point -->
<xsl:template match="*">
<xsl:apply-templates select="$sc_item" mode="main"/>
</xsl:template>
<!--==============================================================-->
<!-- main -->
<!--==============================================================-->
<xsl:template match="*" mode="main">
<p>Attempt 1:
<xsl:value-of select="$overrideImage" disable-output-escaping="yes" /></p>
<p>Attempt 2:
<sc:image select="$overrideImage" mw="200" /></p>
</xsl:template>
</xsl:stylesheet>
だから、1(実際の規格に準拠し動作しますが、ないもの)うちレンダリングしよう: &試み2は何も出てレンダリングしません。
イメージを正しくレンダリングするにはどうすればよいですか?
'注意してください' '読むべき' –
David