Assuming I am fetching an entry like so:

{% set profile = craft.entries.id(8268).one %}

What is the easiest way to generate a link that allows you to edit that entry in Craft? I know you can do the following:

{{ siteUrl ~ 'admin/entries/profiles/' ~ profile.id }}

But surely there must be a better way?

1 Answer 1


profile.cpEditUrl is what you're looking for.

  • So easy, thank you!
    – Jamie Wade
    Sep 19, 2019 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.