Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Using Custom Content Types2:39 with Diane Douglas
Creating specialized content types tailored to the specific goal of your website is a powerful Drupal feature.
Key Steps to Creating Custom Content
- To start making your own custom content type, click on the “Structure” link in the Management Menu, and then select “Content Types”.
- Then, click on “Add content type”. Here you can fill out a form to define its name, description, and other settings. This lets you control things like how the submission form is laid out.
- When you finish with that page, you can click on ‘Save and add fields’ to create custom fields for your content type, like a dropdown menu or a price field.
- When you are finished creating your custom content type, you can use it by clicking on ‘Add content’, just like normal. Your new custom content type will appear side by side with the defaults of ‘Basic Page’ and ‘Article.’
Let's try it out.
Click the add content link and
here we can click on our new custom content type, Coffee Import.
Let's make one.
It's name is going to be Treehouse Blend.
And the description, oh I don't know.
An exotic blend of flavors
you are bound to learn from.
And we'll scroll down and see, there's our Locale field.
We'll say that it's [LAUGH] from Portland, OR.
And the price will be a very reasonable $8 per pound.
Finally, we get to select a roast, and we'll say that's a medium roast.
We can leave all of this stuff alone, and then click Save.
And here we are, our new Treehouse Blend, a beautiful coffee import display.
Let's make another one for practice.
You should make a few, because we will end up using these later.
So again, I go to the Add Content link.
Select Coffee Import and the name will be Batman Blend.
It is dark as the night.
The locale would, of course, be Gotham.
And the price is a little steeper on this one.
$16 per pound.
And, of course the roast would have to be dark.
Let's click save, and now if we go to our front page,
we can see both of our new coffee imports.
Creating specialized content types
tailored to the specific goal of your website is a powerful Drupal feature.
Perhaps a photographer's portfolio website would include custom content types for
fancy portraits and panorama photography, since each might include
different information which you want displayed in different ways.
Studio portrait's would have to include the person's name,
while a panoramic nature photograph would need to have the pictures location, and
maybe even the time of day and the settings on the camera.
Drupal allows you to get as specific as you need to, because even though we
are making custom content types, with fields beyond the usual title and
description, each of them is just another node.
You need to sign up for Treehouse in order to download course files.Sign up