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 28 forks source link

Add option to rename root nodes #21

Closed JayDarnell closed 5 years ago

JayDarnell commented 5 years ago

Hello everyone. First of all, thank you for creating this fantastic module!

One of the clients I'm doing some work for has a moodle installation which represents the LMS portion of an overall online presence. This client has a series of other sites which are running Drupal. In a recent visual upgrade all of the Drupal sites were updated with a single "master menu" at the top of them to tie all of them together, giving end users the illusion of a single site. We're upgrading the Moodle installation to behave in a similar fashion.

We're adjusting breadcrumbs and menus on each site to aid in creating the illusion of a single site. For example, each child site has a leading breadcrumb called "Home" which links to a single base site. I was able to accomplish this breadcrumbs change in Moodle using a renderer. This gave me the following breadcrumbs:

Home > Courses > ... insert reset of breadcrumbs ... (Home points to the main site while Courses points to the front page of the Moodle install)

I wanted to modify the navigation to match, changing the Home link to say Courses. This boostnavigation plugin does some amazing things (we're using it to remove the Private Files item form the navigation) but I was wondering if it could be extended to allow for renaming items in this fashion? I have a small code update I will submit as a possible starting point.

abias commented 5 years ago

Hi @JayDarnell ,

I saw that you created this issue and have closed it right away.

Let me give you a short answer anyway: Basically, this plugin (or better: The mechanisms this plugin uses to modify the navigation tree and the Boost navdrawer) could be used to rename the root nodes in the navdrawer. However, I am wondering if it is worth the effort and overhead as you can already rename the root nodes simply in your local language pack.

Cheers, Alex

JayDarnell commented 5 years ago

Thanks for responding @abias I learned something about Moodle this morning thanks to you. I was not aware that this was possible. I'm still struggling to navigate the Moodle codebase somewhat. The two root nodes I need to rename are the one for where the Home link takes you and the one for the (Search) Courses page: /course/index.php

I've created a custom theme so I'm familiar with defining strings in a language file but am not currently sure where these original values are located so I can be sure I'm overwriting the correct strings.