moodle-an-hochschulen / moodle-local_boostnavigation

Moodle plugin which tries to overcome some fixed appearance behaviours of Boost's nav drawer in a clean way
GNU General Public License v3.0
39 stars 27 forks source link

Possibility to add custom node area #33

Closed bharatpareek closed 5 years ago

bharatpareek commented 5 years ago

So continuing our discussion from Telegram group,

I was trying to add a new root node, but the node is always added in existing node areas, (which are defined when navigation class is initiated).

Is there a possibility to add a new node area with the plugin, as explained in the attached image.

Dashboard

I am also trying from my side and will add a PR if i find something.

Thank you.

abias commented 5 years ago

Hi @bharatpareek ,

the plugin is already able to add the nodes you are looking for. They are called "bottom nodes", please create them with the local_boostnavigation | insertcustombottomnodesusers plugin setting.

Please also note that there was a bug in #32 until today which might have prevented that the gap is added to the buttom nodes.

Cheers, Alex

bharatpareek commented 5 years ago

I believe this is like a workaround for my use case. The node created this way is still in "Dashboard node area / list group".

If you have noticed, a new parent div with 'list-group' class is created for "Site Administration" node, I am trying to achieve the same thing.

Research continue. :)

abias commented 5 years ago

Well, the bottom nodes which can be added with this plugin are a workaround. Visually, they appear (on standard Boost theme and on Boost child themes which have not been fundamentally modified the nav drawer) like the "Site administration" node. But in fact they are not.

With the navigation API and the way how Moodle constructs the flat navigation in the nav drawer, you are not able to add another <nav class="list-group m-t-1"> element in the nav drawer.

I will reopen this issue for further discussion as I am curious to hear why you insist on getting another <nav class="list-group m-t-1"> element.

bharatpareek commented 5 years ago

Actually i am planning to hide the existing node areas and show a custom activity navigation in the sidebar, when user views any activity. (incourse layout).

Even i tried things but seems impossible for now, So now i will modify the existing 'coursehome' node area, remove all it's children and add collapsible activity navigation.

abias commented 5 years ago

Ok. I think, then you are diverting from what this plugin is doing and it is not really realistic to add your requirements to this plugin. You are free to take parts of this plugin for your own use. Good luck!

bharatpareek commented 5 years ago

Yes sir, my intention was never to get features i intend to use, implemented in the plugin.

Came here from Moodle dev chat, where you suggested to create issue in GIthub for discussion purpose.

bharatpareek commented 5 years ago

Thank you, i will try and let you know if i have some progress and if that can be implemented in this plugin too.

abias commented 5 years ago

Thank you, i will try and let you know if i have some progress and if that can be implemented in this plugin too.

This is the real spirit of plugin development :) Good luck!