Answers.Body: <p>Please read the <a href="https://github.com/craftcms/docs/blob/v3/en/updating-plugins.md#rendering-templates" rel="nofollow noreferrer">docs</a> (or <a href="https://docs.craftcms.com/v2/plugins/templates.html" rel="nofollow noreferrer">this</a>) about how to render plugin templates. It's all well explained there . You don't need to define <code>src/templates</code> but your plugin handle</p>
  
  <pre><code>`plugin-handle/settings.html`
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-28T20:06:57.623Z
Answers.LastActivityDate: 2018-04-28T20:06:57.623Z
Answers.UserDisplayName: Robin Schambach
Body: <p>Creating a plugin that contains a custom field. I need to have some custom html for the settings of the field. I have the following in my field class:</p>
  
  <pre><code>/**
   * @inheritdoc
   */
  public function getSettingsHtml()
  {
      return Craft::$app-&gt;getView()-&gt;renderTemplate("src/templates/settings.html", [
          'field' =&gt; $this,
      ]);
  }
  </code></pre>
  
  <p>I have a "settings.html" in "src/templates". </p>
  
  <p>What am I doing wrong?</p>
  
Tags: <plugin-development><templating><custom-fieldtype>
Title: Unable to render a plugin template
ThreadText: # Unable to render a plugin template
  
  (Asked by: username_0 on 2018-04-28)
  
  Creating a plugin that contains a custom field. I need to have some custom html for the settings of the field. I have the following in my field class:
  
  ```
  /**
   * @inheritdoc
   */
  public function getSettingsHtml()
  {
      return Craft::$app->getView()->renderTemplate("src/templates/settings.html", [
          'field' => $this,
      ]);
  }
  
  ```
  
  I have a "settings.html" in "src/templates".
  
  What am I doing wrong?
  
  **Tags:** plugin-development, templating, custom-fieldtype
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-04-28. Score: 2 | Accepted answer
  
  Please read the [docs](https://github.com/craftcms/docs/blob/v3/en/updating-plugins.md#rendering-templates) (or [this](https://docs.craftcms.com/v2/plugins/templates.html)) about how to render plugin templates. It's all well explained there . You don't need to define `src/templates` but your plugin handle
  
  ```
  `plugin-handle/settings.html`
  
  ```
  
  
  ---
  
  