diff --git a/templates/_partials/fields/select.html.twig b/templates/_partials/fields/select.html.twig index 9a7957b8d..52cf49fb9 100644 --- a/templates/_partials/fields/select.html.twig +++ b/templates/_partials/fields/select.html.twig @@ -33,8 +33,9 @@ {% set autocomplete = field.definition.get('autocomplete')|default ? 'true' : 'false' %} {% endif %} -{% if limit is not defined %} - {% set limit = field.definition.get('limit')|default(2000) %} +{% set limit = config.get('general/maximum_listing_select', 2000) %} +{% if field.definition.get('limit') is defined and field.definition.get('limit') is not empty %} + {% set limit = field.definition.get('limit') %} {% endif %} {% block field %} diff --git a/templates/content/_relationships.html.twig b/templates/content/_relationships.html.twig index 66b1a397e..9379d5b6e 100644 --- a/templates/content/_relationships.html.twig +++ b/templates/content/_relationships.html.twig @@ -6,9 +6,10 @@ {% set options = related_options(fromContentType, toContentTypeSlug, relation.order|default(), relation.format|default(), relation.required, relation.allow_empty, relation.link_to_record|default(false), ) %} {% set value = record|related_values(toContentTypeSlug) %} + {% set limit = config.get('general/maximum_listing_select', 2000) %} - {% if limit is not defined %} - {% set limit = relation.get('limit')|default(2000) %} + {% if relation.get('limit') is defined and relation.get('limit') is not empty %} + {% set limit = relation.get('limit') %} {% endif %}
@@ -26,14 +27,14 @@