@@ parentid属性是否适用于Sitecore查询?

pel*_*cid 3 sitecore sitecore6

Sitecore 参考讨论了您可以在Query中使用的一些属性,包括@@ templatename,@@ id和@@ parentid等.

parentid似乎不起作用 - /sitecore/content//*[@@parentid!=''] 永远不会返回任何结果.虽然/sitecore/content//*[@@templatename!='']工作正常.Sitecore版本为6.5和6.6.

有人能用@@ parentid查询吗?(也许它使用Ancestor/Descendant表而我缺少数据? - 只是一个猜测)

Der*_*ker 5

它试图将值解析为GUID并失败.相反,尝试一个空的GUID,如下所示:

/sitecore/content//*[@@parentid!='{00000000-0000-0000-0000-000000000000}']
Run Code Online (Sandbox Code Playgroud)