17 - Implementing the Work Section - Part 1
In this chapter we’ll actually do the things to get the Work section implemented that we planned out during the content modeling phase of our project.
One of the big advantages to documenting the content model up front is that it’s much easier to come back to a dormant project and jump back into development.
‘Nuff said about that.
The Building Blocks
In the content heirarchy of ExpressionEngine the lowest-level blocks are the individual fields. Let’s get those in place for our work/portfolio section. Implement the following (per the Content Model that we mapped out):
Create a new File Upload Preference for the Work images. As part of that File Upload Preference create the following Image Manipulations:
- Related Image: 220px wide
- Gallery Image: 300px wide
- Main Image: 940 px wide
Now create the Work Field Group and then the following fields within it:
- Work Image, File field type, mapped to the File Upload Preference you just created.
- Work Description, Rich Textarea field type, XHTML formatting.
- Work Client, text field, no formatting.
- Work Link, text field, no formatting.
The next level of building block is a Category Group. Categories allow you to pull groups of entries from within a channel. In our case we’ll use them to organize the Work section into the Photography, Print, Video, and Web views that the design calls for.
Create a Category Group named “Work” and within it create the four categories I just mentioned.
Tying It Together
With the low-level blocks created we can now create the Work channel. Do that, and remember to assign the Field Group, the Category Group, and the Status Group.
You now have the necessary structures in place to begin entering content. Enter 5-6 Work entries, filling in all the fields and remembering to assign categories to each.
In the next chapter we’ll setup the templates to display this content.