localgov icon indicating copy to clipboard operation
localgov copied to clipboard

Have separete/different page titles for Admin and FE

Open AWearring opened this issue 1 year ago • 7 comments

Issue

With the increasing number of pages being created using the Publications module that will quite often have the same titles (eg "Introduction", "Summary", etc) the Admin->Content view is not at all clear as to which page is which - this is not just an issue with Publications as potentially duplicated titles can (and do) exist across service areas too.

Bracknell Forest's solution

At Bracknell they have added a "Display title" field image "on our ... content types we have a title, which auto populates the display title (which can then be changed if needed). That first field is then used back end, in search, in the tab name but NOT used for the page itself" (copied from a conversation on Slack with @LizziCBFC)

Is this something that we could "safely" implement as default in LGD for all content types? What do you think? @willguv @finnlewis @markconroy @stephen-cox @ekes @rupertj @andybroomfield

AWearring avatar Nov 12 '24 14:11 AWearring

This module might be worth checking out: https://www.drupal.org/project/node_display_title

From the description it sounds like solves the same problem.

rupertj avatar Nov 12 '24 14:11 rupertj

I'll take a look at this - thanks

AWearring avatar Nov 12 '24 14:11 AWearring

It doesn't seem to work with LGD "out of the box"

AWearring avatar Nov 12 '24 15:11 AWearring

What's the issue with it Alastair? I think Essex have implemented an admin title in some areas so I can have a chat with them too

willguv avatar Nov 12 '24 15:11 willguv

It's probabbly the page header block which replaces the page title from Drupal. It would need to altered to support display title or an event subscriber added to support it.

andybroomfield avatar Nov 12 '24 15:11 andybroomfield

@willguv I suspect that @andybroomfield is right and it's the page header block. Don't have the time right now to investigate further, maybe I'll be able to look into it further later in the week

AWearring avatar Nov 12 '24 15:11 AWearring

Just to note Bracknell's current solution uses logic in all the relevant templates to either pull out the display title or fall back to the normal title if not set. This approach would be tricky to extend to arbitrary LGD sites...

I just tried the Node Display Title module - it's something of a hack, but seems to work well here! It hijacks the node loading mechanism to swap the title with the display title if the current page route is not an admin route.

graham-web avatar Nov 12 '24 17:11 graham-web