Problem/Motivation
All fields have configurable description but not the title field. Also the title field will have configurable display once https://www.drupal.org/project/drupal/issues/2923701 gets merged. I think we should also provide a configurable description for the title field.
Proposed resolution
Create a new Content-Type Title Description field, which allows us to add a configurable help text/description for the title field.
Remaining tasks
Steps to reproduce/Testing steps
1. Goto admin/structure/types/manage/basic page
2. Observe that the title description field is absent.
3. Apply the patch.
4. Reload.
5. Observe that the title description field has been added.
User interface changes
New configuration Title Description field has been added for Content-Type
API changes
Data model changes
Release notes snippet
Comments
Comment #2
awm commentedComment #3
awm commentedComment #4
timmillwoodIf adding this feature we'll needs tests.
Comment #5
awm commentedComment #6
awm commentedadding tests.
Comment #8
awm commentedfixing the tests.
Comment #9
awm commentedComment #11
awm commentedComment #12
awm commentedComment #13
timmillwoodLooks good, thanks!
Comment #14
awm commentedComment #15
alexpottThe test looks good.
This could result in two updates to configuration if you change both the label and the description. We should do something like:
Comment #16
awm commentedComment #17
awm commentedComment #21
dionsjPatch #16 works fine for me with 9.0.2, I assume it's because it hasn't change much since 8.7.
I now get a description field just below where I can edit the name of the title field.
It also properly exports and imports to/from config.
Not sure about the tests as I haven't gotten my testing setup to work, so someone with more testing experience with Drupal should probably weigh in on that.
Comment #23
abhijith s commentedApplied patch #16 .Now the title description field is available at edit section of a content type.
Including screenshot :
Before patch :
After patch:
RTBC
Comment #24
abhijith s commentedComment #25
alexpottThe patch doesn't apply to 9.2.x
Comment #26
anushrikumari commentedComment #27
anushrikumari commentedRerolled patch #16 for 9.2.x, please review.
Comment #28
alexpottI think there are a couple of things to consider from a UX perspective.
Tagging for a product manager review to get product/UX feedback.
Also the issue summary could do with an update to go into the usecase a little but more.
Also there is a module for this functionality already - https://www.drupal.org/project/node_title_help_text - with 2000 odd downloads so some people definitely need this functionality. And there is a help page on how to do this with form alters... https://www.drupal.org/node/1218528
Comment #29
alexpottThere's also history of removing a description #2350041: Remove node title field description
Comment #31
chikeWe have people signing up to use our site and we found that unlike our inhouse trained content authors, the ones that signed up do not write SEO-friendly titles so we needed to leave some instruction under the field, then I found a need for this feature. I was a bit surprised this wasn't there all the while.
I applied #16 and it worked.
Comment #34
rakhi soni commentedI have created a patch for version 9.5x, Now the title description field is available at edit section of a content type. Kindly review patch,,
Comment #35
ranjith_kumar_k_u commentedComment #36
rinku jacob 13 commentedI have successfully applied patch #35 for 9.5.x. Adding screenshots for the reference
Comment #37
yashingole commentedComment #38
yashingole commentedVerified and tested patch #35 on Drupal 9.5.x-dev. Patch applied successfully and looks good to me.
Testing steps:
1. Goto admin/structure/types/manage/article
2. Observe that the title description field is absent.
3. Apply the patch.
4. Reload.
5. Observe that the title description field has been added.
Testing Result:
1. After applying the patch the title description field appears.
Can be move to RTBC
Comment #39
quietone commentedTwo years ago in #28, an issue summary update was asked for by a committer. That has yet to be done. And in #29 he questions whether this should be done at all because this was removed in #2350041: Remove node title field description.
And I see this is tagged for a product manager review, which has not happened.
There has been one comment for support of this feature request, aside from the author of this issue. Is that sufficient to do this?
Setting to NW for the issue summary update.
Comment #40
awm commentedI am not following how #2350041 is related to this. It has to do with the content type form.
This issue allows us to add a configurable help text/description for the title field.
Comment #42
rassoni commentedPatch #35 Verified and tested locally on Drupal 10.1.x.
Patch applied successfully and looks good to me.
Testing steps:
1. Goto admin/structure/types/manage/basic page
2. Observe that the title description field is absent.
3. Apply the patch.
4. Reload.
5. Observe that the title description field has been added.
Testing Result: After applying the patch the title description field appears.
Comment #43
aziza_a commentedChecked the code, also title appears in the node as expected
RTBC + 1
Comment #44
smustgrave commentedStill needs issue summary update.
Comment #45
sahil.goyal commentedUpdating the IS.
Comment #46
sahil.goyal commentedComment #47
gábor hojtsyThe API already allows to configure this, it is not exposed on the UI though. I can see the use case of needing to give some guidance to the user about the title field. I also don't think this goes against #2350041: Remove node title field description, that removed a badly technical hard coded description, while this one does not add a new hardcoded description but exposes a feature to the user instead.
The field however is not added consistently with the rest of the elements. How is the field description presented on other field config pages? That would be best to replicate here.
Comment #48
danielvezaAddressed #47.
Changed the field label to "Title field description"
Updated the description of the field based on the generic field description.
Comment #49
smustgrave commentedThanks @Gábor Hojtsy for taking a look!
Appears to have a build failure
Comment #50
rassoni commentedFixed Build failure.
Comment #51
smustgrave commentedThanks @Rassoni !
Comment #54
jordik commentedRe-rolled patch from #50 to 10.2.x-dev.
Comment #55
acbramley commentedThe Title field is a base field on Node.
Base fields can have their labels and descriptions overridden using the base_field_override config.
There is a module to expose UI to do this https://www.drupal.org/project/base_field_override_ui
Alternatively you can use drush to generate one for you, see https://www.previousnext.com.au/blog/overriding-base-field-labels-and-de...
An example of a title base field override for the page content type:
File: core.base_field_override.node.page.title.yml