Remove page title

Hi, I'd like to remove the page title from a custom page in my panel. I found on the docs a way to customise it, but not remove it:
protected static ?string $title = 'Custom Page Title';
protected static ?string $title = 'Custom Page Title';
Does anybody know how to do this? Thanks!
6 Replies
mavrick
mavrick2mo ago
Hello, maybe you can try
protected static ?string $title = null;
protected static ?string $title = null;
Kanalaetxebarria
Hey! That just renders out the default name unfortunately :/
mavrick
mavrick2mo ago
Okay, empty string will make the job ^^
protected static ?string $title = '';
protected static ?string $title = '';
Kanalaetxebarria
not in my case :/ throws an error
Typed property Filament\Navigation\NavigationItem::$label must not be accessed before initialization
Typed property Filament\Navigation\NavigationItem::$label must not be accessed before initialization
Already tried both of those, should've specified on the question I suppose
ak_nadeem
ak_nadeem2mo ago
you can override this function: public function getTitle(): string | Htmlable { return 'This is page title'; }
Kanalaetxebarria
Awesome! Returning an empty string from that function did the trick. Thanks!