<p>Use the following code in order to add context menu options to any panel button:</p> <pre class="syntax"> $APPLICATION -> AddPanelButtonMenu($btnId, $arMenuItem) </pre> <p>where:</p> <ul> <li><b>$btnId</b> is the button identifier;</li> <li><b>$arMenuItem</b> is the array of options.</li> </ul> <p><div class="hint"><b>Note: </b>пthe options can be resorted according to a sorting index using the following structure: <pre class="syntax">"RESORT_MENU" => true</pre></div></p>