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 $isLoggedIn
|
||||||
* @property bool|string $isModal
|
* @property bool|string $isModal
|
||||||
* @property bool|int $useAsLogin
|
* @property bool|int $useAsLogin
|
||||||
|
* @property string $browserTitle Optional custom browser title for this request (3.0.217+)
|
||||||
* @method array getUserNavArray()
|
* @method array getUserNavArray()
|
||||||
* @method array getPrimaryNavArray()
|
* @method array getPrimaryNavArray()
|
||||||
* @method string renderFile($basename, array $vars = [])
|
* @method string renderFile($basename, array $vars = [])
|
||||||
@@ -93,6 +94,7 @@ abstract class AdminThemeFramework extends AdminTheme {
|
|||||||
public function __construct() {
|
public function __construct() {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->set('useAsLogin', false);
|
$this->set('useAsLogin', false);
|
||||||
|
$this->set('browserTitle', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function wired() {
|
public function wired() {
|
||||||
@@ -580,6 +582,9 @@ abstract class AdminThemeFramework extends AdminTheme {
|
|||||||
*/
|
*/
|
||||||
public function getBrowserTitle() {
|
public function getBrowserTitle() {
|
||||||
|
|
||||||
|
$browserTitle = $this->browserTitle; // custom defined browser title
|
||||||
|
if(strlen($browserTitle)) return $this->sanitizer->entities($browserTitle);
|
||||||
|
|
||||||
$browserTitle = $this->wire('processBrowserTitle');
|
$browserTitle = $this->wire('processBrowserTitle');
|
||||||
$modal = $this->wire()->input->get('modal');
|
$modal = $this->wire()->input->get('modal');
|
||||||
|
|
||||||
@@ -936,4 +941,3 @@ abstract class AdminThemeFramework extends AdminTheme {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user