Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/bolt/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ query_search:
# example in `type: select`.
maximum_listing_select: 50000

# Default number of records returned by a content query (e.g. `{% setcontent %}`
# or the query DSL) when no explicit `limit` is given. This guards against
# unintentionally fetching an entire ContentType. Override per query with
# `limit`, e.g. `{% setcontent pages limit 30 %}`.
query_default_limit: 20

# Template for showing the search results. If not defined, uses the settings for
# listing_template and listing_records.
#
Expand Down
5 changes: 3 additions & 2 deletions src/Storage/ContentQueryParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ protected function parseOperation(): void
*/
protected function parseDirectives(): void
{
// If the user doesn't pass in a limit, we'll get 20. Don't break the site by fetching _all_.
$this->directives = ['limit' => 20];
// If the user doesn't pass in a limit, we fall back to the configured
// default (20). Don't break the site by fetching _all_.
$this->directives = ['limit' => $this->config->get('general/query_default_limit', 20)];

if (! $this->params) {
return;
Expand Down
Loading