---
title: "ModerationTokenViewHelper"
manual: "Events2"
version: "main"
permalink: "https://docs.typo3.org/permalink/jweiland/events2:moderationtokenviewhelper@main"
source: "AdministratorManual/Templates/ViewHelpers/ModerationTokenViewHelper.rst"
rendered: "2026-11-23T08:41:16+00:00"
---

# ModerationTokenViewHelper {#moderationtokenviewhelper}

Returns the `moderationToken` for the activation link of an event. The
action `activate` of the Management plugin is allowed with a valid
`moderationToken` only. The action `confirmActivation` is allowed with a
valid `moderationToken` or for backend administrators. See
[Access rules of the frontend management](https://docs.typo3.org/permalink/jweiland/events2:frontend-management-access@main).

Use this ViewHelper in templates without a controller, which could assign
the token. It returns an empty string, if the event does not exist.

<!-- TODO: no Markdown rendering for "versionchanged" -->

The mail template of the EmailToReceiver finisher of the event form
uses the finisher variable SaveEvent.moderationToken of the
SaveEventFinisher instead of this ViewHelper.

<!-- TODO: no Markdown rendering for "versionchanged" -->

The token is created by
JWeilandEvents2ServiceManagementAccessService instead of
the removed EventModerationService. The format of the token is
unchanged, so activation links of already sent mails stay valid.

## Arguments {#arguments}

-   **event**

    The event object or the UID of the event.

## Basic example {#basic-example}

```html
<f:variable name="moderationToken">{e2:moderationToken(event: event)}</f:variable>

<f:link.action pageUid="{pidOfManagementPage}"
               action="confirmActivation"
               controller="Management"
               extensionName="Events2"
               pluginName="Management"
               absolute="1"
               arguments="{event: event, moderationToken: moderationToken}">
    Datensatz freischalten
</f:link.action>
```
