I use the following code on all my sites:
{if member_group == "1"}
<a href="http://{root}/system/index.php?C=edit&M=edit_entry&weblog_id={embed:the_weblog}&entry_id={embed:the_entry}" target="_blank" rel="noopener">_{root}/themes/site_themes/default/edit.gif</a>{/if}I put this next to the title or custom field of pretty much everything so if you are logged is as admin you get a little edit icon next to all dynamic content. Clicking on this takes you directly to the admin CP and to the edit page of the item, making editing a much simpler process for end users.
I’m having a bit of a problem with my first MSM site.
I updated the code for each site to include the ‘S=2&’ in the URL indicating which site the admin link is for.
{if member_group == "1" OR member_group =="6"}
<a href="http://{root}/system/index.php?S=2&C=edit&M=edit_entry&weblog_id={embed:the_weblog}&entry_id={embed:the_entry}" target="_blank" rel="noopener">_{root}/themes/site_themes/default/edit.gif</a>{/if}The problem is, if you are logged into the CP and you had Site1 previously loaded, even with the added ‘S=2&’, Site1 will still be loaded when you get into the adminCP and you just get the an empty edit page as the item isn’t valid for that site.
Is there a way, via a URL, to force the adminCP to open up in a specific site for MSM setups?
Is the previous site controlled via cookies? If so, then does my admin edit code need to include something that will adjust the cookie so the right site is loaded using my edit code?
Hopefully there is a simple solution cause this is something I use all the time and I find that clients use it the rather than find something in the adminCP.
Thanks.