# $productPage->previewUrl()

> Returns the preview URL with authentication for drafts and versions

- Source: `src/Cms/Page.php#L905` <https://github.com/getkirby/kirby/blob/6.0.0-beta.1/src/Cms/Page.php#L905>
- Inherited from Kirby, not part of the Merx API. See <https://getkirby.com/docs/reference>.

```php
$productPage->previewUrl(Kirby\Content\VersionId|string $versionId = 'latest'): null|string
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$versionId` | `Kirby\Content\VersionId\|string` | `'latest'` |

## Return type

`null|string`

## Parent class

`Wagnerwagner\Merx\ProductPage` inherited from `Kirby\Cms\Page`
