[英]Select a specific node in umbraco
I have this select statement that selects all of the child nodes of what we do . 我有这个选择语句,它选择我们所做的所有子节点。 How would I now select a specific one? 我现在将如何选择一个特定的? See code below: 参见下面的代码:
<xsl:for-each select="$currentPage/ancestor-or-self::Homepage//WhatWeDoItems [@isDoc]">
</xsl:for-each>
There are four items in what we do. 我们要做的事情有四个。 They have the document type of WhatWeDoItems
and they are: 它们具有WhatWeDoItems
的文档类型,它们是:
I need to select each one of them individually in order to display them on the home page. 我需要分别选择它们中的每一个,以便在主页上显示它们。 Am I going in the right direction or is there a better solution? 我是朝着正确的方向前进还是有更好的解决方案?
You should probably post the whole XML, but if I understand correctly you can just use 您可能应该发布整个XML,但如果我理解正确,则可以使用
<xsl:value-of select="$currentPage//WhatWeDoItems/corporate" />
Just create a XSLT macro with the code above and insert the macro in out template. 只需使用上面的代码创建XSLT宏,然后将宏插入out模板即可。
If you don't know how to do that look at the video tutorials : 如果您不知道该怎么做,请查看视频教程 :
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.