> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# $wsMaintenance - Maintenance mode

> Reference for $wsMaintenance: check whether the shop is in maintenance mode and show a maintenance page or disable functions in templates.

With the `$wsMaintenance` module, you can check whether the shop is in maintenance mode. This way you can display a maintenance page to visitors or temporarily disable certain functions. In this section, you will learn how to query the maintenance mode in the frontend.

***

## Module overview

**Example / excerpt of** `$wsMaintenance`

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{{= $wsMaintenance | json }}
```

**JSON output**

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "isMaintenanceMode": "ƒ()"
}
```

Note: `ƒ()` denotes a function.

**Methods overview**

| **Method**            | **Return type** | **Description**                                           |
| --------------------- | --------------- | --------------------------------------------------------- |
| `isMaintenanceMode()` | bool            | Checks whether the shop is currently in maintenance mode. |

***

## Templates

The maintenance mode check can be used on any template. It is typically used to display a maintenance page or to disable certain functions.

***

## Variables

No variables are available for `$wsMaintenance`.

***

## Methods

### \$wsMaintenance.isMaintenanceMode()

Checks whether the shop is currently in maintenance mode.

**Signature**\
`$wsMaintenance.isMaintenanceMode()`

**Return value**\
`bool` - `true` if maintenance mode is active, otherwise `false`.

**Example** that checks whether maintenance mode is active.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{{ if $wsMaintenance.isMaintenanceMode() }}
  // Maintenance mode is active
{{ /if }}
```

***

## Actions

No actions are available for `$wsMaintenance`.

***

## Examples

### Check whether maintenance mode is active

This example checks whether maintenance mode is active and outputs a corresponding message.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{{ if $wsMaintenance.isMaintenanceMode() }}
    <p class="alert alert-danger">Shop is in maintenance mode.</p>
{{ /if }}
```

***

## Related links

* [maintenance - Maintenance mode](/en/konfiguration/maintenance-wartungsmodus)
