[development] node type without a title?

Bèr Kessels ber at webschuur.com
Thu Sep 7 15:14:20 UTC 2006


Op donderdag 7 september 2006 14:10, schreef Jeremy Epstein:
> However, I doubt that a node type without a title field would work
> very well in practice, because of the 'title' field being used in so
> many places, such as in the node listing links (as you pointed out).

The problem lies deeper. We abuse titles for several things:
1 Unique, or semi-unique identifiers in the admin areas (node overviews, etc)
2 Unique, or semi-unique identifiers on the site (title listings in forum, 
blocks etc)
3 A subject: To show a boldfaced/strong "title" above an article.
4 A subject: To show a boldfaced/strong link above an article, leading to the 
full article (node).

2-4 could, but should not be required to, come from the same metadata.
1 has absolutely nothing to do with the metadata "title", allthough in a lot 
of cases/sites it may be a good idea to use the title for this.

Again, this comes down to some fundamental "designs" of Drupal. I feel it is 
wrong to enforce a title, because we want a unique identifier! Obviously a 
list with "nothings" (a list of nodes w/o that identifier) is horrible.
But unfortunately too many people then automatically conclude "then titles are 
required"!

I have made nodes where I hid the title and autogenerated it from other 
metadata: "feedback on $foo by $bar", or "microcontent: site mission", 
or "%username's personal profile". etceteras.
All are unique identifiers, but none are form fields. Most make no sense at 
all to store in the database either, because all of these can be build on 
_view or on _load perfectly fine.

Concluding:
Titles should be optional at all costs. Titles do not need to be stored in the 
database as single entity. Unique identifier (wich may be represented in 
$node->title, if that makes backwards compatibility simpler) is required.

Bèr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20060907/1d16305c/attachment.pgp


More information about the development mailing list