Closed amjohnson46 closed 5 years ago
I was able to add the same icon to all custom nodes by changing line 259 of \local\boostnavigation\locallib.php to the following: new pix_icon('i/home', ''));
This works for me currently as all my custom links are site home substitutions. Being able to select the icon the settings would be nice.
Hi Aaron,
I am also interested in this feature and was able to talk about this with @abias at #MoodleDACH18 DevCamp last month. It is certainly possible, but at the moment I have no ressources to implement this feature.
Besides, there is an open discussion if pix_icons should be supported at all as support for pix_icons was removed in another plugin of moodleuulm (https://github.com/moodleuulm/moodle-local_navbarplus/) in favour of Font Awesome icon identifiers.
Cheers, Christian
Hi Christian,
I'm not set on the pix_icons code. I just copied it from line 1143 of moodle/lib/navigationlib.php.
I'd love to help, but I'm not really a programmer; I mostly just tweek and copy. Plus I also have the available resources problem. Putting the home icon in there meets my current purposes.
Thanks, Aaron
Hi Christian,
I realized today that I had been using an older version of this plug-in. The newest version does include a font awesome icon in the custom navigation nodes. It would be nice if this could be accessed in the app settings, but I will now use the default icon.
Thanks, Aaron
Hi Aaron,
In Moodle 3.5, all nodes in the navigation block have icons to the left of the text.
I know - these were contributed by my colleage @Kathrin84 and me to Moodle core :)
Would it be possible to add icons to the custom nodes generated by this plug-in?
Custom nodes created by this plugin should have a generic "bullet" icon:
I have just published a version for Moodle 3.5, please double-check if you are getting the bullet icons or not.
If you want to change this icon, you have to modify these two lines: https://github.com/moodleuulm/moodle-local_boostnavigation/blob/master/locallib.php#L238 https://github.com/moodleuulm/moodle-local_boostnavigation/blob/master/locallib.php#L274
Basically, I would like to let admins configure the (FontAwesome) icon for each custom node. But I will be waiting for https://tracker.moodle.org/browse/MDL-62942 to avoid creating a really hacky solution in the plugin to support all FontAwesome icons.
Looking forward to admins being able to configure FontAwesome icons for each custom node! Hope they work on that Tracker item soon!
Hi all,
unfortunately, https://tracker.moodle.org/browse/MDL-62942 didn't bring the results which I hoped for. It will be difficult to add this change to Moodle core and I don't have the time to pursue it.
However, I was able to implement custom node icon support by introducing just another fumbling mechanism into the plugin. This is now commited in https://github.com/moodleuulm/moodle-local_boostnavigation/commit/d5879b87100e43c6430737cbcd5921eb2919a36e and will let you use any FontAwesome (4 which is the FontAwesome version included in Moodle currently) icon for custom nodes. Pix_icons are not supported. And I hope that I didn't oversee any problems with this approach.
Please give it a try and have fun.
Cheers, Alex
In Moodle 3.5, all nodes in the navigation block have icons to the left of the text. Would it be possible to add icons to the custom nodes generated by this plug-in?
Thanks, Aaron