Local Plugin Add Settings Link

Local Plugin Add Settings Link

از Lucas Fath در
Number of replies: 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


میانگین امتیازات: -
In reply to Lucas Fath

Re: Local Plugin Add Settings Link

از Benjamin Ellis در
تصویر 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
In reply to Benjamin Ellis

Re: Local Plugin Add Settings Link

از 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
In reply to Lucas Fath

Re: Local Plugin Add Settings Link

از Mark Sharp در
تصویر Core developers تصویر Particularly helpful Moodlers تصویر Plugin developers
In reply to Mark Sharp

Re: Local Plugin Add Settings Link

از Benjamin Ellis در
تصویر 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 لبخند