F
Filament2mo ago
pace

It's possible change the "default title" for all tabs?

Currently filament show the (of the tab) title using this code in layout/base.blade.php:
@php
$title = trim(strip_tags(($livewire ?? null)?->getTitle() ?? ''));
$brandName = trim(strip_tags(filament()->getBrandName()));
@endphp

<title>
{{ filled($title) ? "{$title} - " : null }} {{ $brandName }}
</title>
@php
$title = trim(strip_tags(($livewire ?? null)?->getTitle() ?? ''));
$brandName = trim(strip_tags(filament()->getBrandName()));
@endphp

<title>
{{ filled($title) ? "{$title} - " : null }} {{ $brandName }}
</title>
But I need to change that and show the brandname before:
{{ $brandName }} - {{ filled($title) ? "{$title} " : null }}
{{ $brandName }} - {{ filled($title) ? "{$title} " : null }}
How can I change ( in a safe way ) this file? I can create some view to override? Or have another solution? But I don't think override the base file is a good idea.
2 Replies
FELL
FELL2mo ago
if u mean this tab title can change from resource lispage e.g <?php namespace App\Filament\Resources\DavalebebiResource\Pages; use App\Filament\Resources\DavalebebiResource; use Filament\Actions; use Filament\Resources\Pages\ListRecords; use Illuminate\Contracts\Support\Htmlable; class ListDavalebebis extends ListRecords { protected static string $resource = DavalebebiResource::class; protected function getHeaderActions(): array { return [ // Actions\CreateAction::make(), ]; } public function getTitle(): string | Htmlable { return ('აქტიური დავალებები'); } public function getHeading(): string { return ('აქტიური დავალებები'); } }
No description
pace
paceOP2mo ago
thanks for awnser! using this:
public function getTitle(): string|\Illuminate\Contracts\Support\Htmlable
{
return ('test');
}
public function getTitle(): string|\Illuminate\Contracts\Support\Htmlable
{
return ('test');
}
I keep with the brandname after the title. I need to result be something like: BrandName - Test
No description
Want results from more Discord servers?
Add your server