customize on side navigation bar

customize on side navigation bar

by Saif Saif -
Number of replies: 2

I am new in moodle.

I want to know that we can customize the link of the side navigation bar? If yes than how can we do this?

For example: 

Edit profile has the following link:

http://localhost/abc/user/editadvanced.php?id=2&course=1

I can change this navigation to

http://localhost/abc/user/mycustompage.php?id=2&course=1

Please help me

thanks

 

Average of ratings: -
In reply to Saif Saif

Re: customize on side navigation bar

by Sam Hemelryk -
Hi Saif,

The navigation block is generated internally by code.
Those links presently are hard coded so to change them would require coding.
If you're happy with that and not afraid of a little PHP there are two obvious ways forward.

1. Hack on core code (evil). Search lib/navigationlib.php for "user/editadvanced"
2. Create a local plugin, define its method to extend the navigation, find the editprofile nodes and change their URLs.

Neither are really good solutions, at least if you create a local plugin it'll be easier to upgrade Moodle in the future.

Hope that helps
Sam
In reply to Saif Saif

Re: customize on side navigation bar

by Rosario Carcò -

If you want, you can make use of my own sitenavigation Block I just finished to reengineer for Moodle 2.3

It is coded as own block, so no problems with interferences with core-code. It is flexible and has a lot of amdin-config-options.

You could simply add your own code to do what ever you want. Or I could extend the existing code myself to include such features as you are requesting.

You can find the sitenavigation block in the Modules&Plugins Database. You could alternatively use also the myCourses Block which is available also as separate Block. This one can be found in these forums. Search for Rosario and myCourses to find it.

Let me know, Rosario