From 10c94533b1b04f2e8decb0977fa3d5b62189796f Mon Sep 17 00:00:00 2001 From: Robin Schambach Date: Wed, 15 Aug 2018 18:06:56 +0200 Subject: [PATCH] Fixed Twig syntax Actually there is no `[ x => y]` Twig syntax. at least when I copy paste your code it throws an Exception `An array element must be followed by a comma. Unexpected token "operator" of value "=" ("punctuation" expected with value ",").` --- docs/dev/element-queries/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/element-queries/README.md b/docs/dev/element-queries/README.md index 5f0f758..f6ef9e4 100644 --- a/docs/dev/element-queries/README.md +++ b/docs/dev/element-queries/README.md @@ -69,7 +69,7 @@ You can also batch-set parameters like so: {% set entries = craft.entries( { section: 'news', - orderBy: ['postDate' => SORT_DESC], + orderBy: {'postDate': SORT_DESC}, limit: 10 } ).all() %}