We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

[SOLVED] The global_edit_this feature does not appear when I log in to the admin page

How Do I?

mamiller's avatar
mamiller
1 posts
4 years ago
mamiller's avatar mamiller

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

       
Andy McCormick's avatar
Andy McCormick
183 posts
4 years ago
Andy McCormick's avatar Andy McCormick

{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}

πŸ‘ 1 πŸ‘ 1
       
mamiller's avatar
mamiller
2 posts
4 years ago
mamiller's avatar mamiller

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>
       
mamiller's avatar
mamiller
2 posts
4 years ago
mamiller's avatar mamiller

Just to document this problem was solved. The developer changed the EE website settings to Cookies only while leaving the backend Cookies and Session ID.

       
Andy McCormick's avatar
Andy McCormick
183 posts
4 years ago
Andy McCormick's avatar Andy McCormick

ah. that’s a different path than where I thought this was headed. Glad you got it worked out.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.