---
title: "Viewhelpers"
manual: "Event management and registration"
version: "8.6"
permalink: "https://docs.typo3.org/permalink/derhansen/sf_event_mgt:viewhelpers@8.6"
source: "ForAdministrators/Templates/Viewhelpers/Index.rst"
rendered: "2026-09-26T09:22:10+00:00"
---

# Viewhelpers {#viewhelpers}

The following viewhelpers can be used in you templates.

## PrefillViewHelper {#prefillviewhelper}

This viewhelper prefills fields in the registration form with values from fe_users.

| Name: | Type: | Description: | Default value: |
| --- | --- | --- | --- |
| fieldname | String | The fieldname which should be prefilled |  |
| prefillSettings | Array | Array of fieldname mappings to fe_users **Example**: ``` prefillFields { firstname = first_name lastname = last_name customfields = custom_field_feuser } ``` | Empty array |

## Uri.PageViewhelper {#uri-pageviewhelper}

This viewhelper does generates a link to the given page with the given
arguments.

This viewhelper can be used in email templates for custom notifications, when you want to link to a
given page in you TYPO3 website.

> [!NOTE]
> This ViewHelper is not aware of any extbase context, so arguments must be
> fully resolved (e.g. use `{event.uid}` if an action required the
> `event` argument)

**Example 1**:

```
<e:uri.page pageUid="22" additionalParams="{tx_sfeventmgt_pieventdetail:{event: registration.event.uid, action: 'detail', controller: 'Event'}}" />

```

**Example 2**:

```
<a href="{e:uri.page(
    pageUid: 123,
    additionalParams: '{tx_sfeventmgt_pieventregistration: {pluginName:\'Pieventregistration\',extensionName:\'sfeventmgt\',action:\'cancelRegistration\',controller:\'Event\',reguid: registration.uid, hmac: hmac}}',
    absolute: 1,
)}" class="button">Remove registration</a>

```

## Uri.OnlineCalendar {#uri-onlinecalendar}

This viewhelper renders a link which will add the given event to an online
calendar of either Google, Outlook, Office 365 or Yahoo.

Available types:

-   google
-   outlook
-   office365
-   yahoo

**Example**:

```
<e:uri.onlineCalendar type="google" event="{event}" />

```

## Event.SimultaneousRegistrationsViewHelper {#event-simultaneousregistrationsviewhelper}

This viewhelper renders an array of possible simultaneous registration for
the given event. The viewhelper respects the max. amount of simultaneous
registrations per user and also respects the amount of remaining participants
for the event.

The index of the array returned starts with 1, so the resulting array can be used
directly in the f:form.select viewhelper.

**Example**:

```
<f:form.select id="amountOfRegistrations" property="amountOfRegistrations" options="{e:event.simultaneousRegistrations(event: '{event}')}" />

```

## Format.ICalendarDateViewHelper {#format-icalendardateviewhelper}

Formats the given DateTime object according to rfc5545, so it can be used in the iCalendar view

## Format.ICalendarDescriptionViewHelper {#format-icalendardescriptionviewhelper}

Formats the given string according to rfc5545, so it can be used in the iCalendar view

## Registration.Hmac {#registration-hmac}

Must be used, when the plugin [Frontend user registrations](https://docs.typo3.org/permalink/derhansen/sf_event_mgt:userregistrationplugin-settings@8.6) is used and it should be possible
for users to cancel registrations (if configured in event). See usage in UserRegistration templates.

## Registration.IsRequiredField {#registration-isrequiredfield}

Can be used to show content, if a field or registration field is configured as required.
See usage in Registration template and registration field partials.

**Example**:

```
<e:registration.isRequiredField settings="{settings}" fieldname="lastname">
    <span class="event-required">*</span>
</e:registration.isRequiredField>

```

## Validation.ErrorClass {#validation-errorclass}

Can be used to show a string, when a given field or registration field has validation errors
See usage in Registration template and registration field partials.

**Example**:

```
<e:validation.errorClass fieldname="email" class="my-custom-class" />

```

## Title {#title}

Use this viewhelper to set the page title and indexed search title on event-detail and -registration pages.

**Example**:

```
<e:title pageTitle="{event.title}" indexedDocTitle="A custom title for indexed search"/>

```

## Category.Count {#category-count}

Can be used to get the amount of events per category.

**Example**:

```
<e:category.count categoryUid="{category.uid}" />

```

## MetaTag {#metatag}

Use this viewhelper to add various meta tags related to the event. The default template for the event
detail view uses this viewhelper to output the meta tags "keyword", "description" and "og:title".

**Example**:

```
<e:metaTag name="keywords" content="{event.metaKeywords}" />
```
