Khanh Hoang - Kenn
Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.
By default, the fields in a content type are displayed from vertically, one field after another. For simple content types, this might not be a bad thing, but if you want some variation in the way your content fields lay out, you have options.
When selecting a strategy for managing content layout, your first decision is 'to code or not to code.' If you are like me, you'll choose not to code. The next decision is which module do you want to use?
There are three popular modules that allow you to arrange the fields in your content such that not all fields are stacked on top of each other:
In this tutorial, we are going to explore the Panelizer module. In order to do this, you will need to have added the following modules to your site: Panelizer, Panels, and CTools.
Go to Configuration > Panelizer (Note: Panels and Display Suite configuration will appear under Structure. This can be confusing, I know, so just remember ... Configuration).
In our example above, the Bog module has been turned on and the plan is to define how all blog posts will be displayed and Article will have options.
For each type of content, you have the option to design the layout of your fields:
Once you make your decision as to the layout you want to control, you then have the option to:
Once you have made these basic decisions, and before you perform any of the options, you need to configure the content type.
Go to Structure > Content Types and then click on Panelizer for the content type you want to configure.
Observe that the two default settings are not checked by default. Checking both options tells Panelizer you want all options for each tab below the default tab to be checked.
Give it a try, check the two options and then click on each tab below. Notice you cannot uncheck anything.
Of course, if you want to manually disable a content option, then uncheck the default and manually configure what is allowed.
In the next step, we need to configure the content items that are being allowed. We can do this one of two ways:
We are going with option 2 first but we will explore Default later.
Return to Configuration > Panelizer.
At this time, your blogs are appearing as they always do. Let's change that.
By default, as soon as you save the layout, you are taken to the content configuration interface. Notice two content items are available. Click+hold+drag the node links to the right side.
Notice the small gear. This is how you add additional content items. Let's do that next.
After you click the gear, click Add content in the popout menu. From this interface, you have several options (assuming you didn't disable anything when configuring the content type in Step 2).
Start by clicking on Node and observe that not only do you get the fields associated with Blog entry, you also get the image field that is currently available on Article as well as Tags and Forums. If you have a complicated site, you might want to return to Step 2 and turn off the fields you don't available to those designing layouts.
For practice, let's select Node author and then click Finish (we'll go with the default for now).
When you are sent back to the content configuration interface, click Save.
As you can see, our layout isn't pretty but I did this to make a point. Your theme is going to play a role in how content items will appear. For instance, the node links are still right justified. Let's make this look nicer.
Click on the Panelizer tab that now appears with View, Edit (and any other tabs provided by modules you might have enabled ... such as Tracker).
Return to a blog entry and observe the following:
The steps above focused on configuring just one layout for Blog entry. In Step 1, the Article content type is configured to allow users to select the predefined layout they want to use.
How was this accomplished?
As you can imagine, there is a lot more you can do. Try exploring the other types of content items such as Activity and Entity. Recall, these are just two options illustrated in Step 5 above. As you can see, you have many options available to you. The more you experiment, the more you will see what Panelizer has to offer. I strongly recommend you plan your layout before diving in because not all layout modules offer the same options. Remember, if Panelizer doesn't offer what you need, consider Display Suite.