[development] node type without a title?

andrew morton graveltech at gmail.com
Thu Sep 7 16:54:57 UTC 2006

On 9/7/06, Bèr Kessels <ber at webschuur.com> wrote:
> Example: an organic group does not have a title, it has a "name". a
> directory-entry does not have a "title", it has a "company-name", and more of
> such things. the deeper you dig, the more examples you find where not only
> the name of the entity (title) is wrong, but where maybe the title has no
> input (form equivalent) and is generated from metadata (wordpress alike: use
> the entry date as title), or where the title is generated from a pattern
> (%type: entry #%number, by %uname). etc.

The audio module is one example of this.

The title most users would input for an audio node is based on the
file's metadata. So, I hacked together a solution where the user can
specify a title using placeholders like "%title by %artist" which is
passed to t() for rendering. The source formatting string is saved for
each node so that the title can be regenerated when the metadata is

The nice thing is that the title is "cached" in the node table and
only needs to be generated when the node is created or updated. I'd
love to see some core support for this type of thing to make it less


More information about the development mailing list