Skip to content

Commit 970ba31

Browse files
iOvergaardclaude
andcommitted
docs: Add cross-references and alternative approach for preview options
Added bidirectional documentation links and alternative implementation guidance: - Added backlink to workspace action menu items documentation - Documented alternative approach using 'default' kind with getHref() for client-side URL construction - Explained when to use previewOption vs default kind for preview URLs - Fixed Vale linting warning by removing opinionated language 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent fdad726 commit 970ba31

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

17/umbraco-cms/reference/content-delivery-api/additional-preview-environments-support.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ On the client side, you'll need an extension of:
8282
- Kind: `previewOption`.
8383

8484
{% hint style="info" %}
85-
You can read more about extensions in the [Extending the Umbraco Backoffice](https://docs.umbraco.com/welcome/getting-started/developing-websites-with-umbraco/extending-the-umbraco-backoffice) article.
85+
Learn more about the `previewOption` kind and workspace action menu items in the [Workspace Action Menu Items](../../customizing/extending-overview/extension-types/workspaces/workspace-action-menu-items.md) article.
86+
87+
You can also read more about extensions in the [Extending the Umbraco Backoffice](https://docs.umbraco.com/welcome/getting-started/developing-websites-with-umbraco/extending-the-umbraco-backoffice) article.
8688
{% endhint %}
8789

8890
Here's a sample extension:
@@ -121,4 +123,13 @@ The default "Save and preview" button is also an extension of this type.
121123
In other words, multiple preview options can co-exist. If you have multiple external environments, you can create preview options for all of them.
122124

123125
The extension `weight` determines the order of appearance. A `weight` above 100 will swap the default preview option with the custom one.
126+
127+
{% hint style="tip" %}
128+
**Alternative approach without server-side URL provider**
129+
130+
If you want to create a preview option that opens a specific URL without server-side logic, you can use the `default` kind instead of `previewOption`. With the `default` kind, you provide an `api` class that implements a `getHref()` method to return the URL to open.
131+
132+
This is useful for static preview URLs or when you can construct the preview URL entirely on the client side.
133+
134+
Learn more in the [Workspace Action Menu Items](../../customizing/extending-overview/extension-types/workspaces/workspace-action-menu-items.md#default) article.
124135
{% endhint %}

0 commit comments

Comments
 (0)