我有以下内容结构
=Main Home Node
-Child Node 1
-Child Node 2
-Child Node 3
- - Sub Node 1 of Child 3
- - Sub Node 2 of Child 3
- - Sub Node 1 of Child 3
-Child Node 4
我正在渲染包含子节点,即 Richtext Editor(Name = sectionBody),如下 XSLT 代码来渲染子节点。
<xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
<h2 class="section-title text-center wow fadeInDown"><xsl:value-of select="sectionHeading"/></h2>
<div class="row">
<xsl:value-of select="umbraco.library:Item($currentPage/@id,'sectionBody')" />
</xsl:for-each>
</div>
</xsl:for-each>
现在我在子节点 3 的富文本编辑器中调用宏来渲染包含子节点 3 的子节点
以下是我用来在 Richtext Editro 中呈现的 XSLT 宏代码
<xsl:variable name="items" select="$currentPage/ancestor-or-self::* [@isDoc and @level = 2 ]/* [@isDoc and string(umbracoNaviHide) != '1']"/>
<div > Sub Node </div>
<xsl:if test="count($items) > 0">
<xsl:for-each select="$items">
<xsl:if test="string-length($items/profileType) > 0">
<div> In If of Sub Node</div>
<xsl:variable name="Chkitems" select="umbraco.library:
Split($items/profileType,',')" />
<xsl:value-of select="$Chkitems"/>
<xsl:for-each select="$Chkitems//value">
<xsl:value-of select="current()"/>
</xsl:for-each>
</xsl:attribute>
</xsl:if>
</xsl:for-each>
</xsl:if>
我可以在富文本编辑器中预览上述宏渲染。但是在网站上渲染时,它只显示“子节点”。但不是内部 div 的值。
我可以在哪里获得标题“sectionHeading”的值但无法查看“sectionBody”