默认情况下,modx revo 中的 wayfinder 插件应该按 menuindex 排序。这似乎不起作用。我有以下内容:
[[!Wayfinder? &startId=`2` &level=`1` &ignoreHidden=`TRUE` &outerClass=`news` &sortBy=`menuindex` &sortOrder=`DESC`]]
我怀疑我忽略了一些愚蠢的事情......
编辑:我已经让它工作了。
我查看了wayfinder.class.php
. 以下行已被注释掉:
$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 */
也许这将有助于将来的某人。