change html <title> only?
On a custom page, is there a native way to change only the html title of a custom resource page? I dont want to affect any breadcrumbs or nav.
19 Replies
nvm, would be good to know, but solved my issue with document.title with javascript. Just needed it for printing purposes.
Maybe like this
protected static ?string $title = 'title';
@Vp that would change the title everywhere, not just the html <title> attribute
wdym everywhere? I create a page using
make:filament-page
and I put this $title and html <title> contain my $title data
I also put this protected ?string $heading = '';
because I don't want the heading to displayHe said he want the
<title>
Tag to change only. Not the displayed title on the page.
So does different $title
and $heading
property works in this case?I think so, I used like above and this is what I get.. notice "custom title" in tab
If they don't want "custom title" in tab, then my answer were wrong 😆
how did you put that custom title?
Solution
like this
protected static ?string $title = 'custom title';
look here is my code:
but this is my title :
Is this resource? because the previous one is for custom page
yes this is a resource created by filament command
I am not sure about resource, sorry
Put it on the pages then.
That "Laravel" is your app_name from .env file right?
thanks dear dennis🤝
yeah that's right
so, problem solves?
yes thank you 🤝 😃