Drupal - Create Content
Drupal - Creating and Managing Content
Section titled “Drupal - Creating and Managing Content”Content is the heart of any website. Drupal provides a powerful and flexible system for creating, organizing, and displaying various types of content through its ‘Content Type’ system. When you install Drupal with the ‘Standard’ profile, it comes with two default content types: ‘Article’ (for time-sensitive content like news or blog posts) and ‘Basic page’ (for static content like ‘About Us’).
This chapter will guide you through the process of creating a new piece of content.
Steps for Creating Content
Section titled “Steps for Creating Content”Step 1: Navigate to the ‘Add content’ Page
In the Drupal administration menu, click on ‘Content’. This usually takes you to /admin/content, which lists existing content.
From the ‘Content’ page, click the ’+ Add content’ button.
Description: This is the starting point for creating any new content item.
Step 2: Choose a Content Type
You will be presented with a list of available content types. For this example, let’s choose ‘Basic page’, as we’ve covered its creation in a previous chapter. If you were creating a blog post, you would select ‘Article’.
Click on the name of the content type you wish to create (e.g., ‘Basic page’).
Description: Each content type has its own set of fields and configuration, tailored to its purpose.
Step 3: Fill in the Content Form
A form will appear with fields specific to the chosen content type. Let’s look at common fields you might encounter, using ‘Basic page’ as an example:
- Title: (Required) The main title for this piece of content. (e.g., ‘Our Company History’).
- Body: The main content area. Drupal typically uses a rich text editor (WYSIWYG, like CKEditor 5) allowing you to format text, add images, embed media, create links, etc. You can select different ‘Text formats’ (e.g., Basic HTML, Full HTML) which control the allowed HTML tags and features.
- Menu settings: (Optional) If you want this content to appear in a menu:
- Revision information: (Optional) When you save changes, Drupal can create a new revision. You can add a ‘Revision log message’ to describe your changes (e.g., ‘Updated contact information’). This is useful for tracking changes and reverting if needed.
- URL path settings:
- Comment settings: (If comments are enabled for this content type) You can usually choose to ‘Open’ or ‘Close’ comments for this specific piece of content, overriding the content type default.
- Authoring information:
- Publishing options:
For an ‘Article’ content type, you might also see fields like ‘Tags’ (for taxonomy terms) or an ‘Image’ field.
Step 4: Save the Content
Once you have filled in all the details, click the ‘Save’ button at the bottom of the form.
Description: This saves the content to the database. If ‘Published’ was checked, it will now be live on your site.
Step 5: View Your Created Content
After saving, you will typically be redirected to view the newly created page. You can see how the title, body, and other fields are displayed according to your theme and content type’s display settings.
If you set a URL alias, you can access the content via that friendly URL. You can also find it in the content list at ‘Content’ (/admin/content).
Managing Existing Content
Section titled “Managing Existing Content”To manage existing content (edit, delete, publish/unpublish):
- Go to ‘Content’ (
/admin/content). - You’ll see a table of all content items. You can filter by title, content type, published status, etc.
- In the ‘Operations’ column for a content item, you can choose ‘Edit’ to modify it or ‘Delete’ to remove it.
- You can also perform bulk operations by selecting multiple items and choosing an action like ‘Publish selected content’ or ‘Delete selected content’.
Real-world scenario: A blogger uses the ‘Article’ content type to write a new post. They add a catchy ‘Title’, write their thoughts in the ‘Body’, upload a ‘Featured Image’, add relevant ‘Tags’ for categorization, and then hit ‘Save’ to publish it. They later edit the post to fix a typo using the ‘Edit’ operation from the content list.
Additional Resources:
- Drupal User Guide - Working with Content: https://www.drupal.org/docs/user_guide/en/content-chapter.html
- CKEditor 5 in Drupal: https://www.drupal.org/docs/core-modules-and-themes/core-modules/ckeditor-5