Task2pdf
Task2pdf copied to clipboard
Smal feature request for the local task menu
Hi creecros,
i wonder if it is possible to have another entry in the local menu of a task. The option to print to pdf directly without the need to open the task first and select this option in the sidebar?

it's definitely possible. just add it to one of the task dropdown hooks in Plugin.php
i.e.
$this->template->hook->attach('template:task:dropdown:after-send-mail', 'task2pdf:print');
https://docs.kanboard.org/v1/plugins/hooks/
I'm not sure I would wait on me to ever get around to it though.
Hi creecros,
thanks for your immediate response. Great.
Unfortunately that hook seams to have no affect. I tried further with
$this->template->hook->attach('template:task:dropdown:before-actions', 'task2pdf:print');
This leads to

This works, but looks funny. Is there a limit for the menu entries? Can one have a submenu? Or remove other entries?
Cheers, Fx
might need to make a template that more closely matches that dropdown and then hook that instead. it's all in the html.