Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszuznanski committed Oct 30, 2023
1 parent f09b2e8 commit 3eff035
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,37 @@ Used for proecessing flexforms.
### RootSitesProcessor
Render your all headless sites configuration for your frontend application.

## Configuration
### Available Settings:
- **Not Enabled**: Headless mode is deactivated.
- **Mixed Mode**: Fluid and headless operate concurrently.
- **Fully Headless Mode**: Headless mode is fully activated.

To set up headless mode, utilize the site configuration flag as shown below:

```yaml
'headless': 0|1|2
```
While the legacy flag (true|false) is still recognized, transitioning to the integer notation is recommended.
### Options:
- **0** (formerly: false) = headless mode is deactivated for the site within the TYPO3 instance.
- **1** (formerly: true) = headless mode is fully activated for the site within the TYPO3 instance.
- **2** = mixed mode headless is activated (both fluid & json API are accessible within a single site in the TYPO3 instance).
Options **0** (formerly: false) or **1** (formerly: true) inform the extension to either fully disable or enable headless mode for a particular site.
### To Enable Mixed Mode:
For a chosen site in TYPO3, follow these steps:
- In the typoscript template for the site, load the "Headless - Mixed mode JSON response" setup file instead of the default headless one.
- Set `headless` flag to a value of `2` in the site configuration file or configure the flag via editor in the Site's management backend.

The mixed mode flag (value of `2`) instructs the EXT:headless extension to additionally check for the `Accept` header with a value of `application/json` when processing requests to the particular site in the TYPO3 instance.

- In cases where a request lacks the `Accept` header or `Accept` has a different value than `application/json`, TYPO3 will respond with HTML content (standard TYPO3's response).
- In cases where a request's header `Accept` matches the value of `application/json`, TYPO3 will respond with a JSON response.

## Development
Development for this extension is happening as part of the TYPO3 PWA initiative, see https://typo3.org/community/teams/typo3-development/initiatives/pwa/
If you have any questions, join #initiative-headless-pwa Slack channel.
Expand Down

0 comments on commit 3eff035

Please sign in to comment.