---
title: "Feature: #54887 - Post-processing of the previewUrl"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-54887"
source: "Changelog/8.0/Feature-54887-Post-processingOfThePreviewUrl.rst"
typo3-version: "8.0"
typo3-major: 8
type: "feature"
issue: 54887
forge: "https://forge.typo3.org/issues/54887"
tags: ["Backend", "PHP-API"]
rendered: "2026-09-18T17:00:34+00:00"
---

# Feature: #54887 - Post-processing of the previewUrl {#feature-54887}

See [forge#54887](https://forge.typo3.org/issues/54887)

## Description {#description}

An additional hook has been added to the method `BackendUtility::viewOnClick()` to
post-process the preview url.

The hook is called with the following signature:

```php
/**
 * @param string $previewUrl
 * @param int $pageUid
 * @param array $rootLine
 * @param string $anchorSection
 * @param string $viewScript
 * @param string $additionalGetVars
 * @param bool $switchFocus
 * @return string The processed preview URL
 */
function postProcess($previewUrl, $pageUid, $rootLine, $anchorSection, $viewScript, $additionalGetVars, $switchFocus)
```

### Register the hook {#register-the-hook}

Register a hook class which implements the method with the name `postProcess`:

```php
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['viewOnClickClass'][] = \VENDOR\MyExt\Hooks\BackendUtilityHook::class;
```
