change title of page not working

i want to change "product varieties" which is in picture.
but protected static ?string $title = 'Custom Page Title'; not working.
my code is the second picture. thanks for help
No description
No description
2 Replies
mvenghaus
mvenghaus5mo ago
are you in a page or resource ? page = getTitle() resource = getModelLabel() | getPluralLabel()
Wakko
Wakko2mo ago
thanks this is what I was looking for.