Page Titles for the different Resource Pages
Is there a function or an property on the Resource or Record Classes to customize what is displayed on the Page Titles? Currently it shows
View {Resource Title} - {App Name}
or Edit {Resource Title} - {App Name}
. Is there a way to customize that?8 Replies
Hi, on each resource page, you can define the title using the $title property or
getTitle
method:
when using the
getTitle
method, how do I identify the current state view/edit/create
?You need to define on each resource pages (Create, Edit, ...)., so you know the current state. You can't define it on master Resource class
ok, thank you
@Julien B. (aka yebor974) , gave a try of what you suggested, don't think that is what I am looking at. when I mentioned page title, I met the meant
<title> </title>
of the resource page and not the title that shows below the breadcrumbFor example, if you make
$title
as "Test", the title attribute of your page becomes "Test - { Brand name of your panel}"
What do you want as title ?So I have different Job Types. Lets take for example a Design Job, so, when someone is viewing the Job, I want the Document title to be
Viewing Design Job #XX
, but the page title below the breadcrumb to be Design Job #XX
. Does it make sense? Similarly for Editing..if i understand you want a different value between the <h1> attribute (in breadcrumb) and the title of the page (<title></title>)
For the breadcrumb title, define $heading attribute or redefine getHeading() method.
ah ok, let me try that. I din't know
$heading
was a thing. Thank you