Answers.Body: <p>I don't know if it's possible to change the name of the CP section, but it has become a common practice to allow each user to change the plugin-name on its setting page:</p>
  
  <p><strong>main plugin file:</strong>
  </p>
  
  <pre><code>function getName()
  {
      return $this-&gt;getSettings()-&gt;name;
  }
  
  protected function defineSettings()
  {
      return array(
          'name' =&gt; array(AttributeType::String, 'default' =&gt; 'SuperPluginName')
      );
  }
  </code></pre>
  
  <p><strong>settings template:</strong></p>
  
  <pre class="lang-twig prettyprint-override"><code>{% import '_includes/forms' as forms %}
  
  {{  forms.textField({
          first: true,
          label: "Plugin Name"|t,
          instructions: "How the plugin should be named in the CP"|t,
          id: 'name',
          name: 'name',
          value: settings.name,
          required: true
      }) 
  }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-03T06:38:16.877Z
Answers.Text: Any tips or info about adding dropdown items to the navigation item?
Answers.UserDisplayName: naboovalley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-03T12:12:04.633Z
Answers.Text: If you mean a dropdown like the one from the settings-link, that is only possible if you add it with javascript.
Answers.UserDisplayName: Victor
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-02T20:22:44.443Z
Answers.LastActivityDate: 2014-07-02T20:22:44.443Z
Answers.UserDisplayName: Victor
Answers.Body: <p>I use Victor In's "getName" function with a minor addition of a check of the type of value returned. I do this because without the value check, I get an error when I try to uninstall a plugin without confirming the value is a string.</p>
  
  <p>Here's my version of the function:</p>
  
  <pre><code>function getName() {
      $name = $this-&gt;getSettings()-&gt;name;
      if (is_string($name) ){
          return $name;
      } else {
          return Craft::t( 'My Default Plugin Name Here' );
      }
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-06T12:45:52.037Z
Answers.LastActivityDate: 2014-09-06T12:45:52.037Z
Answers.UserDisplayName: John Morton
Body: <p>I'm wondering if I can have another name for my Plugin CP navigation item?</p>
  
  <p>Let's say my plugin is called "Company name Social Media" but I want the navigation item to just say "Social Media". Might be a bad example but I think you understand what I mean. Let's say I'll release a commercial Craft plugin w/ my company name in it, but I want the customer to be able to add the plugin for a client without my name visible (more then on the plugins page).</p>
  
  <p>Also is there any way to add dropdown-like sub-navigation items to the CP navigation for a plugin?</p>
  
Tags: <plugin-development><control-panel><navigation>
Title: Is there any way to change the CP navigation item for a plugin?
ThreadText: # Is there any way to change the CP navigation item for a plugin?
  
  (Asked by: username_0 on 2014-07-02)
  
  I'm wondering if I can have another name for my Plugin CP navigation item?
  
  Let's say my plugin is called "Company name Social Media" but I want the navigation item to just say "Social Media". Might be a bad example but I think you understand what I mean. Let's say I'll release a commercial Craft plugin w/ my company name in it, but I want the customer to be able to add the plugin for a client without my name visible (more then on the plugins page).
  
  Also is there any way to add dropdown-like sub-navigation items to the CP navigation for a plugin?
  
  **Tags:** plugin-development, control-panel, navigation
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2014-07-02. Score: 5 | Accepted answer
  
  I don't know if it's possible to change the name of the CP section, but it has become a common practice to allow each user to change the plugin-name on its setting page:
  
  **main plugin file:**
  
  ```
  function getName()
  {
      return $this->getSettings()->name;
  }
  
  protected function defineSettings()
  {
      return array(
          'name' => array(AttributeType::String, 'default' => 'SuperPluginName')
      );
  }
  
  ```
  
  **settings template:**
  
  ```twig
  {% import '_includes/forms' as forms %}
  
  {{  forms.textField({
          first: true,
          label: "Plugin Name"|t,
          instructions: "How the plugin should be named in the CP"|t,
          id: 'name',
          name: 'name',
          value: settings.name,
          required: true
      }) 
  }}
  
  ```
  
  > **Comments:**
  > **username_0**: Any tips or info about adding dropdown items to the navigation item?  
  > **username_1**: If you mean a dropdown like the one from the settings-link, that is only possible if you add it with javascript.  
  
  ---
  
  ### Answer by username_2 on 2014-09-06. Score: 2
  
  I use username_1 In's "getName" function with a minor addition of a check of the type of value returned. I do this because without the value check, I get an error when I try to uninstall a plugin without confirming the value is a string.
  
  Here's my version of the function:
  
  ```
  function getName() {
      $name = $this->getSettings()->name;
      if (is_string($name) ){
          return $name;
      } else {
          return Craft::t( 'My Default Plugin Name Here' );
      }
  }
  
  ```
  
  
  ---
  
  