Expression Engine - custom data fields
Many Content Management Systems don’t give you much freedom with how to input and manage your content. Quite often you’ll be restricted to one field for the document title, and another for your text. Luckily Expression Engine doesn’t tie you down like that.
What is a custom field?
When you add an item of content to your site, the actual article might have several parts;
- A title
- A summary, brief description or tag line
- The full body text
- One or more images
- External web links
- Internal related links
- Part numbers, codes, prices
- Search engine related data
- Specific details to help control output and so on…
You can probably think of a few more instances! By giving each part it’s own custom field, your content suddenly becomes a lot more flexible in terms of how you can use it on your site.
An example
Let’s say you’re using Expression Engine for publishing a product catalogue to your site, and each of your products uses six custom fields;
- Product title
- Product code
- Product price
- Product detailed description
- Product image
- Product availability (a drop down select box with two options for “In stock” and “Out of stock”)
The content of each custom field can then be used individually, or mixed and matched to produce the desired outcome. For instance;
- Display all your products in a grid or list using just title, image and price
- Display a product detail page using all data fields
- Display product title, code and price in a quick reference table
The Product availability field can be very flexible indeed. As it’s a select box you choose from a list of pre-defined option values which makes it quick to update. In the example you could use the value to show that the item was in or out of stock, or using a “conditional” in your template you could make EE just not display items not in stock.
EE flexes it’s muscles
Out of the box you can assign several different types of data field. There are addons that extend this list but for the purposes of this article I’ll just list the default ones, and don’t forget that you can use as many of each type as you need;
Text input
A single line entry field, useful for titles, short summaries, codes, prices etc.
Text area
A multi line entry field, for any content that requires multi line entries.
Drop down select list
Select data from a pre-defined list, the data can be anything you want - Yes/No, Off/On, Red/Green/Blue, Small/Medium/Large - anything you want!
A date
Get a date using the handy date picker, ideal for event dates, deadline dates etc.
A relationship with another item of content
You can create an association between two or more content items, typically used to create automatic links from one item to another.
Organising data has never been so easy in an affordable application!
Share |


