Skip to content

Commit e8210bc

Browse files
committed
minor #5549 Allow to have empty page titles (javiereguiluz)
This PR was merged into the 4.x branch. Discussion ---------- Allow to have empty page titles Fixes #5545. The proposed behavior (`null` === use the default title; `(empty string)` === don't show any title) fits well with the behavior of the rest of features of this bundle. As `@Lustmored` said, the only issue is that you'll see a new "missing translation" for the empty string: <img width="964" alt="missing-translation" src="https://user-images.githubusercontent.com/73419/209708276-2c321204-4e7b-40c6-9386-0779a7ac4bf7.png"> I think someone could send a PR to Symfony to "fix" this and to simply output an empty string when "translating" an empty string. Commits ------- 27ed94e Allow to have empty page titles
2 parents e7c5597 + 27ed94e commit e8210bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Dto/CrudDto.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function getCustomPageTitle(string $pageName = null, $entityInstance = nu
163163
$title = null !== $entityInstance ? $title($entityInstance) : $title();
164164
}
165165

166-
if (null === $title || '' === $title) {
166+
if (null === $title) {
167167
return null;
168168
}
169169

0 commit comments

Comments
 (0)