Build Notes: Admin Edit Links.

Posted by Chuck Norton | Last edited on December 6th, 2011 // 02:56am PST

Edit links have really helped me give the site over to clients without having to even train them at all! I just give them login access.. then they can edit the site from the frontend.

Here is how it works...

Admins see: 

 

on backend we add: 

 

on the backend, all we need to do is add global snippets:


global_edit_this:


<div class="global_edit_this"><a class="modallinkbig" target="_blank" href="?S=0&amp;D=cp&amp;C=content_publish&amp;M=entry_form&amp;channel_id={channel_id}&amp;entry_id={entry_id}&amp;use_autosave=n">Edit This Page</a></div>

 

global_edit_channel


<div class="global_edit_this edit_channel">
<a target="_blank" href="?S=0&amp;D=cp&amp;C=content_publish&amp;M=entry_form&amp;channel_id={channel_id}">+</a>
<a target="_blank" href="?S=0&amp;D=cp&amp;C=content_edit&amp;channel_id={channel_id}">Edit {channel} Items</a>
</div>

this to css:

.global_edit_this {   position: absolute;   top: 5px;   right: 0px; }
.global_edit_this a {     color: white;     text-decoration: none;     font-size: .875em;     background-color: rgba(0, 0, 0, 0.7); padding: .5em 1em; }
.global_edit_this a:hover {         color: white;         background-color: #5e6b4c;      }
.global_edit_this.edit_channel {position:absolute; top:35px;}

then just pop those snippets anywhere within a exp:channel:entry

{global_edit_channel} {global_edit_this}

 

Back