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
mavrick7mo ago
Hello, maybe you can try
protected static ?string $title = null;
protected static ?string $title = null;
Kanalaetxebarria
KanalaetxebarriaOP7mo ago
Hey! That just renders out the default name unfortunately :/
mavrick
mavrick7mo ago
Okay, empty string will make the job ^^
protected static ?string $title = '';
protected static ?string $title = '';
Kanalaetxebarria
KanalaetxebarriaOP7mo ago
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_nadeem7mo ago
you can override this function: public function getTitle(): string | Htmlable { return 'This is page title'; }
Kanalaetxebarria
KanalaetxebarriaOP7mo ago
Awesome! Returning an empty string from that function did the trick. Thanks!
Want results from more Discord servers?
Add your server