CRUD templates should set a page title

Bug #602330 reported by AMcBain
8
This bug affects 1 person
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'}Administration - #{get 'title' /}#{/set}

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 ...

Tags: crud

Related branches

Revision history for this message
AMcBain (mcbain-asm) wrote :

er, small typo. The list.html title would more appropriately be:

#{set title:'List ' + type.name /}

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.