gpt4 book ai didi

ModX Revo : getResources not sorting by menu index

转载 作者:行者123 更新时间:2023-12-01 20:24:18 27 4
gpt4 key购买 nike

我想按菜单索引来排序我的资源,并有以下代码:

[[!getResources? &parents=`50` &sortdir=`ASC` &sortby=`menuindex` &limit=`100` &includeTVs=`1`  &processTVs=`1` &tpl=`temp` ]]

但是 sortby 无法正常工作。

谁知道我做错了什么?

谢谢!

最佳答案

如果您阅读文档,您会发现 sortby 字段必须编码为 JSON 字符串。 http://rtfm.modx.com/display/ADDON/getResources

如果你想按 menuindex 排序,这应该可行:

[[!getResources? &parents=`50` &sortdir=`ASC` &sortby=`{"menuindex":"DESC"}` &limit=`100` &includeTVs=`1`  &processTVs=`1` &tpl=`temp` ]]

关于ModX Revo : getResources not sorting by menu index,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12291441/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com