[英]How to fetch articles on custom page in MODX CMS
I am new to the MODX CMS so I don't know more about this CMS.我是 MODX CMS 的新手,所以我不太了解这个 CMS。 I tried to fetch articles in the custom template please see screenshot 01:-
我试图在自定义模板中获取文章请看截图 01:-
This is the shortcode of articles which I am using to fetch the articles on the custom pages please see screenshot 02:-这是我用来在自定义页面上获取文章的文章的简码,请参见屏幕截图 02:-
This is the article template and this is working fine with the shortcode Please see the Screenshot 03:-这是文章模板,使用简码可以正常工作请参阅屏幕截图 03:-
I Researched on the google so I found this我在谷歌上研究所以我发现了这个
[[getResources]]
but I don't know how to use it.但我不知道如何使用它。
First of all check this reference: https://docs.modx.com/current/en/extras/getresources/index But as for me it'll be much better to use pdoResources(has useful option &showLog for your needs) from pdoTools extra: https://docs.modx.pro/en/components/pdotools/snippets/pdoresources For test purposes please call uncached (with ! sign before name) snippets fe首先检查这个参考: https://docs.modx.com/current/en/extras/getresources/index但对我来说,使用 pdoTools 的 pdoResources(有有用的选项&showLog来满足您的需要)会好得多额外: https://docs.modx.pro/en/components/pdotools/snippets/pdoresources出于测试目的,请调用未缓存(名称前带有!符号)片段 fe
[[!getResources]], [[!pdoResources]]
Also be aware these snippets don't show hidden and unpublished resources by default, you should point this directly: fe另请注意,这些片段默认情况下不会显示隐藏和未发布的资源,您应该直接指出:fe
[[pdoResources?&showUnpublished=`1`]]
[[getResources?&showUnpublished=`1`&showHidden=`1`]]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.