Created
September 3, 2014 16:38
-
-
Save samhernandez/bc0516fa4b8e8151606f to your computer and use it in GitHub Desktop.
Craft CMS edit entry link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if entry is defined and currentUser and currentUser.can('editEntries:' ~ entry.id) %} | |
<a href="{{ entry.cpEditUrl }}" class="edit-this section-{{ entry.sectionId }}">Edit this</a> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this file in a
partials
folder and include it wherever you need an edit link.Example
_entry.html
: