[英]Umbraco: What can I do to fix my stream content with Multiple Node Tree Picker?
I'm looking for a correct way to use the 'Multiple Node Tree Picker'. 我正在寻找使用“多节点树选择器”的正确方法。 I installed the package, created a data type with it, then I wrote a Macro and I can use the drag and drop feature to choose what pages I want to show in the Homepage (from the Featured Articles Section of my website), but it doesn't show anything.
我安装了程序包,并使用它创建了数据类型,然后编写了宏,然后可以使用拖放功能选择要在首页中显示哪些页面(来自网站的“特色文章”部分),但是什么也没显示。 Clearly, I've did something wrong in the Macro (XSLT), I don't know so much about XSLT.
显然,我在宏(XSLT)中做错了什么,我对XSLT不太了解。 Thanks.
谢谢。
<xsl:param name="currentPage"/>
<xsl:template match="/">
<xsl:if test="$currentPage/articlePicker/MultiNodePicker/nodeId">
<xsl:for-each select="$currentPage/articlePicker/MultiNodePicker/nodeId">
<xsl:variable name="node" select="umbraco.library:GetXmlNodeById(1144)" />
<a href="{umbraco.library:NiceUrl(.)}">
<xsl:value-of select="$node/@nodeName" />
</a>
</xsl:for-each>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
try this ..... 尝试这个 .....
<xsl:param name="currentPage"/>
<xsl:template match="/">
<xsl:if test="count($currentPage/articlePicker/MultiNodePicker/nodeId) > 0">
<xsl:for-each select="$currentPage/articlePicker/MultiNodePicker/nodeId">
<xsl:variable name="node" select="umbraco.library:GetXmlNodeById(current())" />
<a href="{umbraco.library:NiceUrl($node)}">
<xsl:value-of select="$node/@nodeName" />
</a>
</xsl:for-each>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.