title: YII2: How can I create a link/url in a Menu item to point to an external webpage instead of an action or view of my application
body: <p>I am using the YII2 Menu Widget and did not find the solution to add attribute options like class , target on created link.</p>
  
  <p>My code is below: </p>
  
  <pre><code>echo Menu::widget(
  [
      'options' =&gt; [
          'class' =&gt; 'sidebar-menu'
      ],
  
      'items' =&gt; [
  
          [
              'label' =&gt; Yii::t('backend', 'Admin'),
              'url' =&gt; Yii::$app-&gt;homeUrl,
              'icon' =&gt; 'fa-list-alt',
              'options' =&gt; [
                  'class' =&gt; 'treeview',
              ],
              'items' =&gt; [
                  [
                      'label' =&gt; Yii::t('backend', 'External link'),
                      'url' =&gt; 'http://google.com',
                      'icon' =&gt; 'fa-list-alt',
                      'options' =&gt; [
                      'target' =&gt; '_blank',
                      ],
                  ],
              ]
          ],                
  
      ]
  ]
   );
  </code></pre>
  
  <p>Option target is not added on generated link.</p>