mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Add PR #269 for support of overriding browser title in AdminThemeFramework class
Co-authored-by: BernhardBaumrock <office@baumrock.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
* @property bool $isLoggedIn
|
||||
* @property bool|string $isModal
|
||||
* @property bool|int $useAsLogin
|
||||
* @property string $browserTitle Optional custom browser title for this request (3.0.217+)
|
||||
* @method array getUserNavArray()
|
||||
* @method array getPrimaryNavArray()
|
||||
* @method string renderFile($basename, array $vars = [])
|
||||
@@ -93,6 +94,7 @@ abstract class AdminThemeFramework extends AdminTheme {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->set('useAsLogin', false);
|
||||
$this->set('browserTitle', '');
|
||||
}
|
||||
|
||||
public function wired() {
|
||||
@@ -579,6 +581,9 @@ abstract class AdminThemeFramework extends AdminTheme {
|
||||
*
|
||||
*/
|
||||
public function getBrowserTitle() {
|
||||
|
||||
$browserTitle = $this->browserTitle; // custom defined browser title
|
||||
if(strlen($browserTitle)) return $this->sanitizer->entities($browserTitle);
|
||||
|
||||
$browserTitle = $this->wire('processBrowserTitle');
|
||||
$modal = $this->wire()->input->get('modal');
|
||||
@@ -936,4 +941,3 @@ abstract class AdminThemeFramework extends AdminTheme {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user