CRUD templates should set a page title
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
play framework |
New
|
Undecided
|
Unassigned |
Bug Description
Currently CRUD generated/handled template pages for list, show, and blank do not set a title ( #{set title:'something' /} ). I think that in terms of those who have page titles based on the page they're currently showing (a good idea if someone decides to bookmkark that page), they should. Since the title variable can be overwritten or ignored elsewhere (if wanted), this doesn't force anyone to such a default.
Basically I think each of the templates (list, show, blank ...) should have something like the following:
#{set title:'List ' + type.modelName /}
#{set title:'New ' + type.modelName /}
#{set title:'Edit ' + type.modelName + ' ' + object.id /}
This will provide a nice default when CRUD is used by itself, and allow opportunity to add more information if tying it into an existing site layout:
<title>Site Name - #{get 'title' /}</title>
or
#{set 'title'
The latter option seems to be useful for chained base templates, the title could then become "Site Name - Administration - ...". The latter line could be placed in an overridden CRUD/layout.html as an example ...
er, small typo. The list.html title would more appropriately be:
#{set title:'List ' + type.name /}