Skip to content

Commit

Permalink
MDL-78806 admin: Setting for displaying site name in page title
Browse files Browse the repository at this point in the history
* A new config setting `sitenameintitle` for displaying the site name
on the page has been created.
  • Loading branch information
junpataleta committed Sep 9, 2023
1 parent d1bc949 commit 5c9a0a8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions admin/settings/appearance.php
Expand Up @@ -244,6 +244,18 @@

// "htmlsettings" settingpage
$temp = new admin_settingpage('htmlsettings', new lang_string('htmlsettings', 'admin'));
$sitenameintitleoptions = [
'shortname' => new lang_string('shortname'),
'fullname' => new lang_string('fullname'),
];
$sitenameintitleconfig = new admin_setting_configselect(
'sitenameintitle',
new lang_string('sitenameintitle', 'admin'),
new lang_string('sitenameintitle_help', 'admin'),
'shortname',
$sitenameintitleoptions
);
$temp->add($sitenameintitleconfig);
$temp->add(new admin_setting_configcheckbox('formatstringstriptags', new lang_string('stripalltitletags', 'admin'), new lang_string('configstripalltitletags', 'admin'), 1));
$temp->add(new admin_setting_emoticons());
$ADMIN->add('appearance', $temp);
Expand Down
2 changes: 2 additions & 0 deletions lang/en/admin.php
Expand Up @@ -1252,6 +1252,8 @@
$string['sitemaintenanceoncli'] = 'Your site is currently in CLI maintenance mode, no web access is allowed.';
$string['sitemaintenancewarning'] = 'Your site is currently in maintenance mode (only admins can log in). To return this site to normal operation, <a href="maintenance.php">disable maintenance mode</a>.';
$string['sitemaintenancewarning2'] = 'Your site is currently in maintenance mode (only admins can log in). To return this site to normal operation, <a href="{$a}">disable maintenance mode</a>.';
$string['sitenameintitle'] = 'Include site name in page title';
$string['sitenameintitle_help'] = 'This setting will append the site name at the end of the page title. It is encouraged to include the site name in the page title as it will improve the site\'s accessibility by allowing users to quickly identify the page that they are currently in.';
$string['sitepolicies'] = 'Site security settings';
$string['sitepolicy'] = 'Site policy URL';
$string['sitepolicy_help'] = 'The URL of the site policy that all registered users must see and agree to before accessing the site. Note that this setting will only have an effect if the site policy handler is set to default (core).';
Expand Down

0 comments on commit 5c9a0a8

Please sign in to comment.