---
title: "Configuration"
manual: "Contexts"
version: "4.0"
source: "Configuration/Index.rst"
rendered: "2026-10-07T05:17:05+00:00"
---

# Configuration {#configuration}

## Extension Configuration {#extension-configuration}

The extension can be configured via the TYPO3 Extension Configuration
(**Admin Tools > Settings > Extension Configuration > contexts**).

-   **enableContexts**

    -   *type:* boolean
    -   *Default:* true

    Enable or disable context processing globally.

-   **contextMatchMode**

    -   *type:* string
    -   *Default:* all

    How multiple contexts are evaluated:

    -   `all`: All assigned contexts must match (AND logic)
    -   `any`: At least one context must match (OR logic)

## Site Set Settings (TYPO3 v13+) {#site-set-settings-typo3-v13}

When using Site Sets, configure contexts in your site's settings:

```yaml
settings:
  contexts:
    debug: false
    matchMode: 'all'
```

-   **contexts.debug**

    -   *type:* boolean
    -   *Default:* false

    Enable debug output for context matching (development only).

-   **contexts.matchMode**

    -   *type:* string
    -   *Default:* all

    Context match logic: `all` (AND) or `any` (OR).

## TypoScript Configuration {#typoscript-configuration}

Basic TypoScript settings for the contexts extension:

```typoscript
plugin.tx_contexts {
    settings {
        # Enable debug mode
        debug = 0

        # Default match mode
        matchMode = all
    }
}
```

## Page TSconfig {#page-tsconfig}

Control context field visibility in the backend:

```typoscript
# Hide context fields from certain user groups
TCEFORM.pages.tx_contexts_visibility.disabled = 1
TCEFORM.tt_content.tx_contexts_visibility.disabled = 1
```

## User TSconfig {#user-tsconfig}

Per-user context field configuration:

```typoscript
# Allow specific contexts only
options.contexts.allowedTypes = ip,domain,getparam
```

## Caching Considerations {#caching-considerations}

Context-dependent content affects caching. The extension automatically:

1.  Adds context identifiers to cache tags
1.  Varies cache entries by active contexts
1.  Clears affected caches when context definitions change

For optimal performance:

-   Use a reverse proxy (Varnish) with context-aware VCL
-   Consider context values in your caching strategy
-   Use appropriate cache lifetimes for dynamic contexts
