0

I am writing a title formatter for display suite, but title isn't a 'CCK' type. Can anyone help me out with how to define the formatter ?

Nealv
  • 6,856
  • 8
  • 58
  • 89

3 Answers3

1

What do you mean the title isn't a "CCK" type? It should be a Field. Try this module: http://drupal.org/project/custom_formatters

David Fells
  • 6,678
  • 1
  • 22
  • 34
  • The title field is different from other fields. Custom formatters can't be used to create formatters for titles. – Nealv Aug 11 '12 at 12:34
1

Since title is a property, not a field, you cannot use a field formatter.

You'll need to take another approach to solve this problem, for example override the node template file, implement a hook_preprocess function, or implement hook_node_view.

edit: There are lots of discussions about properties versus fields. Here are some links to get you started with some background about why title is still a property, as well as some related modules.

Note: I have not used all these modules and do not endorse them in any way, and don't claim that they address your question. This is just a short listing for your edification:

aaronbauman
  • 3,549
  • 2
  • 24
  • 30
0

There is an issue for the custom formatters module about that: #816924: Custom formatter for title field?

geek-merlin
  • 1,720
  • 17
  • 13