Skip to content

Instantly share code, notes, and snippets.

@piotrpog piotrpog/quick_edit.twig
Last active Jun 7, 2019

What would you like to do?
Quick edit link component for Craft CMS. More info on
{# v2 #}
{# #}
{% if currentUser and currentUser.can('accessCp') and not %}
{% if (entry is defined and entry.isEditable) or (category is defined and category.isEditable) %}
<div class="edit-button">
<a href="{{ entry.getCpEditUrl() ?? category.getCpEditUrl() }}" target="_blank" class="button is-info">
{% endif %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.