Skip to content

Commit

Permalink
Fixed Twig syntax
Browse files Browse the repository at this point in the history
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 ",").`
  • Loading branch information
Anubarak authored Aug 15, 2018
1 parent 3afdc57 commit 10c9453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/dev/element-queries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() %}
Expand Down

0 comments on commit 10c9453

Please sign in to comment.