How to add a custom button at the right section of an entry? I would like to add a custom button in the right section of a channels entry form in the CMS. 
The this button needs to go to a custom url of the plugin that I have created. The link should contain entry ID so that I can use this ID in my plugin.
You can add custom HTML in exactly the spot you’re hoping to, using the (undocumented) cp.entries.edit.right-pane template hook.

To use it, add this to your plugin’s primary class:

public function init()
{
    craft()-&gt;templates-&gt;hook('cp.entries.edit.right-pane', function(&amp;$context) {
        /** @var EntryModel $entry **/
        $entry = $context['entry'];

        // Make sure this is the correct section
        if ($entry-&gt;sectionId == 5) {
            // Return the button HTML
            $url = UrlHelper::getUrl('some/path/'.$entry-&gt;id);
            return '&lt;a href="'.$url.'" class="btn"&gt;My Button!&lt;/a&gt;';
        }
    });
}