Change URL link on "website" and "help" sidemenu options

Re: Change URL link on "website" and "help" sidemenu options

- Dani Palou の投稿
返信数: 5
画像 Core developers 画像 Moodle HQ 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers

Hi Pedro,

those URLs are configured in the file:

core/components/sidemenu/templates/menu.html

To change the Website URL, you need to modify the item that uses the string mm.sidemenu.website. You can remove the ng-href attribute and use the href you want, or make the ng-href point to some other variable.

Yo change the docs url you need to modify the item that uses the string mm.sidemenu.help. As before, you can use a fixed href or you can change the value of the docsurl variable.

Kind regards,

Dani

Dani Palou への返信

Re: Change URL link on "website" and "help" sidemenu options

- Shao Chen の投稿

I can change the website on side menu in the menu.html, but couldn't find the place that turn off "my file" on the side menu. Please help.

Thanks


Shao Chen への返信

Re: Change URL link on "website" and "help" sidemenu options

- Manjunath Moodle の投稿

Dear Shao,

  One option is custom CSS like this -  https://moodle.org/mod/forum/discuss.php?d=341039 

  Other option is to remove respective "addon" or make changes in services/handlers.js of respective addon depending on your requirement.

  Hope this helps.

  

 

  

Manjunath Moodle への返信

Re: Change URL link on "website" and "help" sidemenu options

- Shao Chen の投稿

Thank you so much. I have further questions:

1. The custom CSS is great. I can see to hide the "website" and "help" from the side menu. But how do you hide the "files" from the side menu?

2. I remove the "files" from the "addon", but the "my files " is still on the side menu, although it doesn't link to files anymore. Where can I remove the "my files" from the side menu? I read before that I need to change a file after removing items from "addon", but I couldn't remember which file.

3. I can't find the services/handlers.js file. 

Many Thanks.

Shao Chen への返信

Re: Change URL link on "website" and "help" sidemenu options

- Dani Palou の投稿
画像 Core developers 画像 Moodle HQ 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers

Hi Shao,

the first thing you need to take into account is that we use "gulp" to build the Javascript file.

If you have your environment ready to use gulp (as it is explained in here) you can edit the files inside www/addons and www/core to achieve what you want. You should open www/addons/files/main.js and delete the line:

$mmSideMenuDelegateProvider.registerNavHandler('mmaFiles', '$mmaFilesHandlers.sideMenuNav', mmaFilesPriority);

You need to run gulp after applying these changes. This will remove the My Files option.


If you don't, then you'll have to edit www/build/mm.bundle.js. You need to delete the same line as above. In this case you don't need to run gulp since you're already editing the final file.

Please let me know if you have any other problem.

Cheers,

Dani