Skip to content

getLivePreviewUrl() #16434

Closed Answered by brandonkelly
ursbraem asked this question in Ideas
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: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by brandonkelly
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