Skip to content

getLivePreviewUrl() #16434

Closed Answered by brandonkelly
ursbraem asked this question in Ideas
Jan 15, 2025 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

I just added a new preview/<elementId> control panel route for Craft 5.6, which renders a standalone Live Preview editor for an element (#16441).

You can render links to it like so:

{% if canSave(entry) %}
  <a href="{{ cpUrl("preview/#{entry.id}") }}">Edit this entry</a>
{% endif %}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@brandonkelly
Comment options

Answer selected by brandonkelly
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants