Skip to content

Instantly share code, notes, and snippets.

@CreativePoweredGeek
Created July 31, 2017 11:34
Show Gist options
  • Save CreativePoweredGeek/31b74bb0032b6d73a377467e982e6d4e to your computer and use it in GitHub Desktop.
Save CreativePoweredGeek/31b74bb0032b6d73a377467e982e6d4e to your computer and use it in GitHub Desktop.
ExpressionEngine 3.x Snippet to place an edit link next to text on the frontend when a user is logged into the control panel.
<!-- This will open the edit window in the Control Panel for this channel entry in a new tab -->
{if logged_in}
<p class="text-center" style="position:absolute;top:0;z-index: 5000;">
<a href="{cp_edit_entry_url}" target="_blank" class="btn btn-default btn-sm btn-edit"><i class="fa fa-pencil-square-o"></i></a>
</p>
{/if}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment