1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-07 07:16:51 +02:00
This commit is contained in:
Ryan Cramer
2024-11-22 10:44:30 -05:00
parent 1a5760a5e8
commit 3bd27723b2
2 changed files with 5 additions and 5 deletions

View File

@@ -193,8 +193,8 @@ abstract class AdminThemeFramework extends AdminTheme {
* *
*/ */
public function getHeadline() { public function getHeadline() {
$headline = $this->wire('processHeadline'); $headline = (string) $this->wire('processHeadline');
if(!$headline) $headline = $this->wire()->page->get('title|name'); if(!strlen($headline)) $headline = $this->wire()->page->get('title|name');
if($headline !== 'en' && $this->wire()->languages) $headline = $this->_($headline); if($headline !== 'en' && $this->wire()->languages) $headline = $this->_($headline);
return $this->sanitizer->entities1($headline); return $this->sanitizer->entities1($headline);
} }

View File

@@ -3345,14 +3345,14 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
} else { } else {
$title = (string) $title; $title = (string) $title;
} }
if(empty($title)) { if(!strlen("$title")) {
if($this->pages->names()->isUntitledPageName($page->name)) { if($this->pages->names()->isUntitledPageName($page->name)) {
$title = $page->template->getLabel(); $title = $page->template->getLabel();
} else { } else {
$title = $page->get('name'); $title = $page->get('name');
} }
} }
if(empty($title)) $title = $page->name; if(!strlen("$title")) $title = $page->name;
} else if($this->parent && $this->parent->id) { } else if($this->parent && $this->parent->id) {
$titlePage = $this->parent; $titlePage = $this->parent;
$title = rtrim($this->parent->path, '/') . '/[...]'; $title = rtrim($this->parent->path, '/') . '/[...]';
@@ -3380,7 +3380,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
$headline = $titlePage->get('title|name'); $headline = $titlePage->get('title|name');
} }
if(empty($headline)) $headline = $title; if(!strlen("$headline")) $headline = $title;
$this->headline($headline); $this->headline($headline);
$this->browserTitle($browserTitle); $this->browserTitle($browserTitle);