Fields vs. Content Types

Ready for review -- AWAITING PEER REVIEW
Learn the difference between fields and content types.

Fields are used to define content types. In this lesson, we will discuss the purpose and use of fields and content types.


* Read the Introduction to Fields lesson


Fields are parts of records which each represent an item of data, used in Drupal to define content types. Content types are predefined collections of data types which relate to each other and can be considered as a correlated whole.

Some fields may only contain simple strings of text, while other fields can hold more complicated datatypes such as dates, numbers, and defined lists. A standard Drupal installation will support most common database field types, with additional field types of higher complexity able to be added through contribute modules.

Content types need not be complex. The built-in Article type is one example, with fields of Title (all content types have a title), Body (accommodates long text suitable for blog posts or other long writing), Image, and a special Tags field.

Fields are separate from and exist apart from content types. Once defined, a field can be reused in multiple content types. For example, a magazine may wish to have different content types for editorials, news items, and sports articles, but they could all share a single image field for the display of thumbnails. Conversely, some fields will end up being unique to some content types (e.g. related teams displayed in sports articles), although the reuse of fields is generally encouraged. Doing so can save you time otherwise spent defining new fields while also allowing you to display, filter, group, and sort content together by field across content types.

Now that you have a basic understanding of fields, go to the next lesson to learn to create a new content type.

Lesson tags: