简体   繁体   English

ModX Ditto:显示选择性文档

[英]ModX Ditto: Display selective documents

I want to use Ditto to display a list of documents. 我想使用Ditto显示文档列表。 I cannot seem to set this up to work correctly. 我似乎无法将其设置为正常工作。 So far I have: 到目前为止,我有:

[!Ditto? &parents=`3` &documents=`10,32,339,86,303,302` &tpl=`blog_summary`!]

But this gives me all the items under Document 3. 但这给了我文件3下的所有项目。

Does anyone know the correct way to do this? 有人知道这样做的正确方法吗?

Thanks! 谢谢!

尝试将“父级”参数设置为0或删除参数“父级”,文档正好是id = 3的文档的子级?

According to the documentation Documents: overrides parents property . 根据文档Documents: overrides parents property Ditto docs 同上文档

So your code should look like: 因此,您的代码应如下所示:

[!Ditto? &documents=`10,32,339,86,303,302` &tpl=`blog_summary`!]

PS: maximkou's might fail because parent 0 is considered the topelement of the hierarchy. PS:maximkou可能会失败,因为父级0被认为是层次结构的补充。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM