© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
bernhard

Resource record title with Html

I have a hotels resource, where some of the hotels have HTML inside their name, like
Hotel XY <sup>Superior</sup>
Hotel XY <sup>Superior</sup>
. On edit pages and inside the breadcrumb, this looks obviously uggly, since its rendered htmlencoded. I tried to make the record title a
HtmlString
HtmlString
:

    public static function getRecordTitle(?Model $record): ?string
    {
        return new HtmlString($record->name);
    }
    public static function getRecordTitle(?Model $record): ?string
    {
        return new HtmlString($record->name);
    }


But this doesn't work, neither in the
HotelResource
HotelResource
nor in the
EditHotel
EditHotel
class. Any ideas or isn't it just not possible?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Resource Title
FilamentFFilament / ❓┊help
2y ago
Customize Record Title
FilamentFFilament / ❓┊help
3y ago
Disable Resource Title
FilamentFFilament / ❓┊help
3y ago
Translate Resource Title
FilamentFFilament / ❓┊help
3y ago