Answers.Body: <p>Figured it out after browsing some existing plugins' source:</p>
  
  <pre><code>Craft::$app-&gt;getView()-&gt;hook('cp.entries.edit.details', function(array &amp;$context) {
      return '&lt;a href="#" class="btn"&gt;My Button!&lt;/a&gt;';
  });
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-02T14:44:43.060Z
Answers.LastActivityDate: 2018-02-02T14:44:43.060Z
Answers.UserDisplayName: Matt Andrews
Body: <p>I want to do something similar to <a href="https://craftcms.stackexchange.com/a/14526/6844">this</a> answer but for Craft 3 (eg. render some custom HTML in the Entry editing screen). I can't work out how to do this with the changed Craft 3 hooks. </p>
  
  <p>Should this be registered as an event now? What class/event ID should I be using to add code to <code>cp.entries.edit.details</code>?</p>
  
  <p>(I'm new to Craft plugin dev so a little unclear how to proceed here)</p>
  
Tags: <plugin-development>
Title: Writing a plugin that triggers on a Control Panel Template Hook?
ThreadText: # Writing a plugin that triggers on a Control Panel Template Hook?
  
  (Asked by: username_0 on 2018-02-02)
  
  I want to do something similar to [this](https://craftcms.stackexchange.com/a/14526/6844) answer but for Craft 3 (eg. render some custom HTML in the Entry editing screen). I can't work out how to do this with the changed Craft 3 hooks.
  
  Should this be registered as an event now? What class/event ID should I be using to add code to `cp.entries.edit.details`?
  
  (I'm new to Craft plugin dev so a little unclear how to proceed here)
  
  **Tags:** plugin-development
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-02-02. Score: 5 | Accepted answer
  
  Figured it out after browsing some existing plugins' source:
  
  ```
  Craft::$app->getView()->hook('cp.entries.edit.details', function(array &$context) {
      return '<a href="#" class="btn">My Button!</a>';
  });
  
  ```
  
  
  ---
  
  