Currently the D8 version currently supports nodes as a proof of concept. Add support other core content entities.

Comments

Sam152’s picture

Title: Support more core entities » Support more core content entities
dman’s picture

+1, this should probably be able to manage the label of any entity.

We started doing some site build, leveraging title module (initially so that we can place an image and the date above the title on full-node view)
When extending the theme, I was hoping to make an additional view mode for taxonomy terms (to show the tag and its associated logo, which would then be shown as a rendered_entity on the pages)

Unfortunately. title support was not there to let me place a terms title into a terms view mode, where I was expecting to see it.
Investigating the code shows that conceptually, the D8 code is in place and expected to be able to do it for any entity, but it seems the UI is not there yet? I could not choose to "Display Configurable Title" for a vocab (presumably we expect to see it on /admin/structure/taxonomy/manage/*.

I have since moved on to using Display Suite to better expose additional entity fields - we need to use it to take better control of several other aspects of the render anyway - so I have an alternative for now.

Sam152’s picture

I agree that supporting just nodes sucks. Based on what I now know with the work done on other contrib modules, I think it would be fairly straightforward to extend the settings to make this configurable on any bundle. The problem comes up in the theme layer. The entity API doesn't assume any kind of standard way of rendering the original entity label in the template. You'll see that there was a tonne of undoing and redoing to be able to hide the node title on command. Throw the new title block in the mix for the full pages, and you have an all out unmaintainable mess on your hands.

This module is potentially completely superseded by modules like display suite and panels, hence the lack of general interest. I also think that the implementation is potentially flawed. Instead of trying to make the existing label base fields display configurable and dealing with all the headaches that come along with that, a new branch could simple expose an extra field?

Assuming it would be worth it at all, I'd probably look at this avenue if I saw this as a valuable D8 project.

dman’s picture

Yeah. I'm putting my weight behind DisplaySuite - to the point where I'd probably remove this one from our ingredients as it's duplicate functionality once that is happening.
(Although I do realise that the original purpose of title.module was more about translations first, and rendering second)

Sam152’s picture

Yep. Having used plain old "manage display" for a long time in D7, this seemed to be a nice feature to have if you were to take the same approach in D8, but I pretty much agree this is defunct now.

Sam152’s picture

AdamPS’s picture

If #5 is still true, please can you inform people?

1) On the project status page D8 section:

  • Link to DS to support "Manage Display" for title field.
  • Remove the reference to plan for an new 8.x-2.x version

2) Update #2607758: [title] Title (core)

AdamPS’s picture

Assigned: Sam152 » Unassigned
Status: Active » Postponed

Let's get the basics working first

Sam152’s picture

#7 sounds like a good approach.

AdamPS’s picture

Update: hopefully we will have a new maintainer #2881412: Request to become co-maintainer

AdamPS’s picture

Status: Postponed » Active

I selected what I thought to be the most useful of the other entities and they are working well from a quick test.

  • User worked with no special hooks
  • Taxonomy term with the same 5-line hook as for node.

Please feel free to suggest any other entity types, or point out ones that are likely to be tricky.

AdamPS’s picture

Parent issue: » #2924253: [META] Plan for D8