Adding fields to a content type in CCK is easy. To do the same thing in Drupal or Wordpress is complicated and doing so makes the developer wonder if they are doing the right thing. This is because Drupal and Wordpress are mixing content, data types, database entry and HTML forms.
Wordpress
With Wordpress there is confusion as to what is a content field and what is meta-data for the content. The fields when added do not perpetuate through to all posts using a particular post type. There is a required amount of programming.
WordPress has the ability to allow post authors to assign custom fields to a post. This arbitrary extra information is known as meta-data. This meta-data can include bits of information such as:Wordpress Documentation
With some extra coding, it is possible to achieve more complex actions, such as using the metadata to store an expiration date for a post.
- Mood: Happy
- Currently Reading: Cinderella
- Listening To: Rock Around the Clock
- Weather: Hot and humid
Meta-data is handled with key/value pairs. The key is the name of the meta-data element. The value is the information that will appear in the meta-data list on each individual post that the information is associated with.
Drupal
Adding fields to Drupal looks easy until the user wants to choose the type of field to be added. Then there is confusion as the system conflates content, database field types, php data types and html form fields in it's UI data storage and documentation. No one ever explained to Drupals developers that files are files and characters are characters. The content type fields UI is not supposed to control and manipulate what is being stored like a database client. The differences between files and images is something for the presentation layer. Number formats do not need to be filtered into the database. Numbers are formatted on retrieval. Shit! there is just so much wrong with the data structure, system architecture and thinking that it would take years to sort out. The situation becomes even more unbearable when the documentation starts using words like "entities". Many of the nearly 30 HTML5 fields are not available or are only available through third party modules.
- Navigate to the Content types page (Administer > Structure > Content types).
- In the table, locate the row that contains your content type and click the MANAGE FIELDS link. If you can't find the MANAGE FIELDS link, be sure to enable the Field UI module.
- In the Add new field section, enter a label for the field.
- In the Field name field, enter the machine name for the field. You can only use numbers, lower-case letters and the underscore character (_).
- In the field type list, select one of the following types:
- Text
- short text such as a name (limited to 255 characters)
- Long text
- long, multi-line alphanumeric text such as a biography
- Boolean
- has one of two values (for example: "yes/no" or "true/false" or "small/large")
- List (text)
- select from a list of text options (which can be formatted as either a drop-down list or checkboxes)
- File
- reference to a file (such as a PDF) on the Drupal file system
- Image
- reference to an image file such as GIF, JPG, PNG on the Drupal file system
- Term reference
- reference id to an existing Taxonomy Term (or tag)
- Integer
- a whole number, such as a year (e.g. 2012) or value (e.g. 1, 2, 5, 305); it does not allow decimals.
- Float
- a number that can use decimals, such as 0.0123456789
- Decimal
- a number that allows exact decimal values; often used for price or cost (such as $199.99)
- List (float)
- select from a drop-down list of floats
- List (integer)
- select from a drop-down list of integers
- Long text and summary
- same as long text, but with an additional summary text

Drupal Documentation
Content Connection Kit
Once a content type has been created in CCK the user may add fields to that content type which are represented by the almost 30 form elements available to HTML5. There is a clear separation of data entry, content and presentation.
The UI makes is easy to find and add a field quickly.
Editing a field is just like editing HTML attributes for that form element.
Summary
.
Common end-users of either Drupal or Wordpress are ignorant of their failings and will remain so. But web programmers, developers and software engineers should be acutely aware of why they should avoid these CMS's.
Take a look at the CCK demo to see first hand just how simple the system is in comparison. See how on it's own CCK is just better than Drupal or Wordpress and why you should be using the Content Connection Kit for your next web project.
Comments
Post a Comment