Local Plugin Add Settings Link

Local Plugin Add Settings Link

deur Lucas Fath -
Getal antwoorde: 4

Hello everybody,

I'm trying to add some settings to my local plugin. So far I've managed to add a settings page, the only thing missing is the link in the plugin list to make it easier for the admin to navigate to the settings.

In the end it should look like this example:
But currently it looks like this example:



I've tried so many things and read a lot of forum disscussion but somehow cant make it work out. 

I also tried implementing a lib.php file as described in https://docs.moodle.org/dev/Local_plugins#Adding_an_element_to_the_settings_menu but I always get 500 response codes.


Can somebody help me please?
Thanks in advance 


Greetings

Dominik


Gemiddeld van beoordelings: -
In antwoord op Lucas Fath

Re: Local Plugin Add Settings Link

deur Benjamin Ellis -
Prentjie van Particularly helpful Moodlers
Hi,

Am I right assuming you have your settings in a settings.php file? is so post some/all the content of it.

Ben
Gemiddeld van beoordelings: -
In antwoord op Benjamin Ellis

Re: Local Plugin Add Settings Link

deur Lucas Fath -
Hey,

yeah you're right. I've also tried to mess with the lib.php file but this always resulted in moodle errors...

Here is the content of my settings.php file:
<?php
defined('MOODLE_INTERNAL') || die();

if ($hassiteconfig) { // needs this condition or there is error on login page
$settings = new admin_settingpage('local_snomsalesforce', get_string('pluginname', 'local_snomsalesforce'));
$ADMIN->add('localplugins', $settings);

// Add url settings
$settings->add(new admin_setting_configtext(
'local_snomsalesforce/url', // name
get_string('salesforce_url', 'local_snomsalesforce'), // visible name
get_string('salesforce_url_desc', 'local_snomsalesforce'), // description
'', // default value
PARAM_TEXT // type
));
}

And after adding this, i have a settings page under Dashboard / Site administration / Plugins / Local plugins / myplugin
Only thing missing is the settings link in the row for my plugin in the plugin overview
Gemiddeld van beoordelings: -
In antwoord op Lucas Fath

Re: Local Plugin Add Settings Link

deur Mark Sharp -
Prentjie van Core developers Prentjie van Particularly helpful Moodlers Prentjie van Plugin developers
I thought this discussion rang a bell ... https://moodle.org/mod/forum/discuss.php?d=426266
Gemiddeld van beoordelings: -
In antwoord op Mark Sharp

Re: Local Plugin Add Settings Link

deur Benjamin Ellis -
Prentjie van Particularly helpful Moodlers
I had a feeling that was the case. I glanced at the settings code and did notice there did not seem to be any functionality regarding the settings link. I was going to make sure before replying but this saves me glimlag
Gemiddeld van beoordelings: -