[development] node type without a title?

Bèr Kessels ber at webschuur.com
Fri Sep 8 13:07:36 UTC 2006


Op vrijdag 8 september 2006 06:39, schreef Larry Garfield:
> Even if not strictly globally unique, a human-readable identifier for a
> node is a good thing.

Yes. but my whole point is, that this *should not be the same as "the thing 
you show above a post'*.

A unique, human readable identifier may be anything, as long as it is somehow 
human readable. While "the thing that comes up above the post" may, or may 
not be unique at all. We can make sure that that "unique humanreadable 
identifier is always there" while a title, may, or may not be there. It could 
be as simple as:
if (!isset($node->title)) {
  $node->title = auto_generate_title($node);
}
But i'd prefer a "real" solution- ie. change the architecture in such a way 
that we no longer have the title as some hardwired "thing", dangling off the 
sides of our nodes. 

I have seen Drupal sites (where nodes were imported from an external "logging 
app") where there were literally tenthousands of titles like 
* CHP event log #123123123: Show...
* CHP event log #234234234: Show...
* ABC event log #345345345: Expo...
And so on. Unusable. esp, because the chopping of long titles (the ...) 
chopped off the only informative part. 
Above a node it looked good:
CHP event log #123123123: Show items that were removed in previous version 
behind the blocks.

Clearly indicating that a title != unique identifier, not always!. But since 
we have hardcoded such elements into the very heart of Drupal, the only 
things you can do, is hack up titles on _load, based on some parameters 
(arg()s). But that is certainly suboptimal. 
-------------- 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/20060908/ebfaf226/attachment.pgp


More information about the development mailing list