Hi I am new to EE, and am working with a newly installed site, EE v 6. In my old version, v2, when I logged in to the admin site, the “edit this” link appeared on all pages.
However, with the new pulled forward EE6 version, it does not.
It is present in the install as a template partial, and it is called from the index page template like so:
<div class="span-12 main">
{exp:channel:entries channel="pages" limit="1"}
{if show_title == "Yes"}<h2>{title}</h2>{/if}
{page_body}
{global_edit_this}
<hr class="space" >
</div>
Is there something obvious I might be missing?
Mark
{global_edit_this}
was a snippet that shipped with the default “agile records” theme. There is not such partial or variable in the newer default themes.
The snippet was basically just a link to edit the entry in Control Panel.
Something similar in EE6 would look like this:
{if member_group==1}
<a href="/admin.php?/cp/publish/edit/entry/{entry_id}">Edit This Entry</a>
{/if}
Just save that as a template partial named: {global_edit_this}
Thanks Andy, I am afraid the issue must be a bit more complex than that. The person who created the site included this {global_edit_this} partial:
{if author_id == logged_in_member_id OR == "1"}• <a href="http://{cp_url}?S=0&D=cp&C=content_publish&M=entry_form&channel_id={channel_id}&entry_id={entry_id}">Edit This</a>{/if}
I substituted yours for this, thinking perhaps there was an error in his version, but this did not change the behavior. The template for the page I am trying to edit is appended, and it seems (to me) have the correct call for the partial. Do you have another thought on this?
{html_head}
<title>CIPRES</title>
{global_stylesheets}
{html_head_end}
<body>
{embed="_includes/.page_head"}
<div class="mid-bg">
<div class="container">
{!--{exp:channel:entries channel="news" limit="1" dynamic="no" search:news_display_home="Yes" require_entry="yes"}
<div id="front-news">
<div class="span-2" id="latest">Latest News:</div>
<div class="span-16 last">
<a href="http://{homepage}/news/detail/{url_title}">{title}</a> – {entry_date format="%F %d, %Y - %g:%i %a"}
</div>
</div>
{/exp:channel:entries}--}
<div class="span-12 main">
{exp:channel:entries channel="pages" limit="1"}
{if show_title == "Yes"}<h2>{title}</h2>{/if}
{page_body}
{global_edit_this}
<hr class="space" >
</div>
<div class="span-6 last">
{page_body_extended}
{/exp:channel:entries}
</div>
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.