modx revo:寻路器不按菜单索引排序

发布于 2024-12-17 02:07:04 字数 689 浏览 1 评论 0原文

默认情况下,modx revo 中的 wayfinder 插件应按菜单索引排序。这似乎不起作用。我有以下内容:

[[!Wayfinder? &startId=`2` &level=`1` &ignoreHidden=`TRUE` &outerClass=`news` &sortBy=`menuindex` &sortOrder=`DESC`]]

我怀疑这是我忽略的愚蠢的事情...

编辑:我现在已经让它工作了。

我查看了 wayfinder.class.php 中的 wayfinder 代码。以下行被注释掉:

$c->groupby($this->modx->getSelectColumns('modResource','modResource','',array('id')));

发生这种情况是因为代码中的以下注释:

/* not sure why this groupby is here in the first place. removing for now as it causes issues with the sortby clauses */

也许这会对将来的某人有所帮助。

By default, the wayfinder plugin in modx revo should sort by menuindex. This doesn't seem to work. I have the following:

[[!Wayfinder? &startId=`2` &level=`1` &ignoreHidden=`TRUE` &outerClass=`news` &sortBy=`menuindex` &sortOrder=`DESC`]]

I suspect it's something stupid I overlooked...

EDIT: I've made it work now.

I looked into the wayfinder code in wayfinder.class.php. The following line was commented out:

$c->groupby($this->modx->getSelectColumns('modResource','modResource','',array('id')));

It happened because of the following comment in the code:

/* not sure why this groupby is here in the first place. removing for now as it causes issues with the sortby clauses */

Maybe this will help someone in the future.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

行雁书 2024-12-24 02:07:04

我查看了 wayfinder.class.php 中的 wayfinder 代码 以下行被注释: $c->groupby($this->modx->getSelectColumns('modResource','modResource','',array(' ID')));

它被注释掉是因为代码中的以下注释:

/* 不确定为什么这个 groupby 首先在这里。现在删除,因为它会导致 sortby 子句出现问题 */

也许这对将来的任何人都有帮助

I looked at the wayfinder code in wayfinder.class.php The following line was commented: $c->groupby($this->modx->getSelectColumns('modResource','modResource','',array('id')));

It was commented out because of the following comment in the code:

/* not sure why this groupby is here in the first place. removing for now as it causes issues with the sortby clauses */

Maybe this helps anyone in the future

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文