Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The Title field is disabled in the bulletin content-type so all bulletins appear in the /admin/content page with the same (no) title, which makes identifying a given bulletin nearly impossible, especially when the update date is unrelated to the actual date of the bulletin.
Proposed resolution
Ideally the bulletin date could be used to generate a title, but any solution starts with including a Title field. The attached patch does that.
Comment | File | Size | Author |
---|---|---|---|
parish_bulletin_title.patch | 479 bytes | Wolfeworks |
Comments
Comment #1
Wolfeworks CreditAttribution: Wolfeworks commentedForget the patch, if you really want to enter a title for every bulletin you add you can edit the bulletin content type to enable/require it, but the solution I found is to install the auto_nodetitle module. I use a 1-liner to automatically insert a title based on the bulletin date:
return 'Bulletin for ' . substr($node->field_bulletin_date['und'][0]['value'], 0, 10);
This module also allows you to update existing bulletins to give them a title too.
I'm closing this issue but it might be worthwhile to add a note about auto_nodetitle to a README.txt file.
Comment #2
geerlingguy CreditAttribution: geerlingguy commentedSounds like a good suggestion - I'll keep this issue open to add a line about auto_nodetitle, like "If you would like to customize the titles for generated Bulletin nodes, you can install auto_nodetitle and configure the title for the Bulletin node type."
Another possibility is adding a 'pattern for generated bulletin titles' to the admin page so people could put in !date or some other variables and set the title how they like without using an extra module.
Comment #3
geerlingguy CreditAttribution: geerlingguy commentedChanging the issue title; I think I'll just add a simple configuration field in the settings where you can put in a string with a placeholder (like the bulletin creation date) for the title. That way the configuration is still simple, auto_nodetitle isn't required for this simple change, and people should be happier :)
Comment #4
geerlingguy CreditAttribution: geerlingguy as a volunteer commentedComment #6
geerlingguy CreditAttribution: geerlingguy as a volunteer commented