Hello,
I’m trying to get my listing of items to be the same in the menu (in the modx user interface) and in the output.
The menu is now set to sort by published date (the regular TV). Which works fine.
However getting the Ditto output listing to do the same is not working.
Listing by pub_date gives me error although all the items have one set (they should not need one hopefully later).
THIS:
[!Ditto? &parents=`2` &tpl=`news_item` &sortDir=`DESC` &sortBy=`pub_date` !]
GIVES ME THIS ERROR:
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: array_multisort(): Argument #1 is expected to be an array or a sort flag
Error type/ Nr.: Warning - 2
File: /srv/www/htdocs/greyamsterdam.com/modx/assets/snippets/ditto/classes/ditto.class.inc.php(562) : eval()’d code
Line: 1
I’ve trying using published_on, published_by, published, orderBy - but either get error or it still lists by createdon.
I guess I could make a new TV specially for publisheddate, but I dont want unnecessary dates, and besides that would likely mess up the sorting of the menu.
Whats the best way to do this?
Please help Im going nuts
Thanks
tim