Last active
August 29, 2015 14:27
-
-
Save sbonardt/2afb172a3b557fc62d37 to your computer and use it in GitHub Desktop.
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
Name: Bolt CMS - Edit link in records | |
{# Edit link old style, but still works: #} | |
{% if app.users.isAllowed('contenttype:%contenttypeslug%:edit:%id%'|replace({'contenttypeslug': record.contenttype.slug, '%id%': record.id})) %} | |
<a href="{{ url('editcontent', {contenttypeslug: record.contenttype.slug, id: record.id}) }}">Edit</a> | |
{% endif %} | |
{# Edit link new way #} | |
{% if record.editlink() %} | |
<span class="edit-link"><a href="{{ record.editlink() }}"><strong>Edit</strong></a></span> - | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment