Hello! I've been following the code for adding page menu buttons (i.e. RHS on dokuwiki template) to my plugin using the TEMPLATE_PAGETOOLS_DISPLAY. It was working perfectly on my test site until I realised my test site was in need of an upgrade so I upgraded and found it was no longer working since TEMPLATE_PAGETOOLS_DISPLAY was deprecated in favour of MENU_ITEMS_ASSEMBLY. Unfortunately, I have been unable to decipher how I can convert my functionality from old to new.
Please can someone provide me a step-by-step guide for how to add a new button that will take me to a given page by url?
I have tried following the examples given in https://www.dokuwiki.org/devel:event:menu_items_assembly and have not been able to follow what is happening - I need more basic instructions please!
For reference, the original button addition function (designed to take you from page "X" to page "gm:X?do=edit©togm=yes") was as follows
$newpage = "gm:" . $ID;
$link = wl("$newpage", array('do' => 'edit', 'copytogm' => 'yes'));
$title = 'Copy to GM';
$event->data['items']['copy_to_gm'] = "<li><a href='$link' class='action gmside_copy_to_gm' rel='nofollow' title='$title'><span>$title</span></a></li>";
Thank you in advance!