I have created a local plugin and want it to have its own icon appear next to its name in the dropdown.
As far as I have understood, all I have to do is put that icon into the plugin's pix folder, make sure it's the right format (16x16px, svg and png for fall-back), then add it when creating the node in the appropriate dropdown. I have tried, and failed. This is the code I used:
$useradminnode->add(get_string('pluginname', 'local_randomiser'), $url,
navigation_node::TYPE_SETTING, null, 'randomiser', new pix_icon('pix/random', 'randomIcon'));
I have tried variations on the path, and checked how other plugins add their icons. And wherever I checked, they don't link to the icon in their pix folder, but instead link to 'i/iconname'. Indeed I found them in moodle/pix/i/
However, when I copy my icons to that folder and then link them the way I have seen in other plugins, the icon is still not shown in the drop-down.
Is there an additional step I need to take? I have tried purging caches, to no avail.
I have, obviously, tried to find documentation on this, but must have looked in all the wrong places...
I'd appreciate some help on this.