Drupal Content Management — Content Types, Fields, Views & Revisions
Unlike simpler CMS platforms where “content” means “pages and posts,” Drupal treats content as structured entities. Every piece of content belongs to a content type, and each content type has exactly the fields it needs. Think of it like a spreadsheet versus a Word document — content types give your data structure, which makes it searchable, filterable, and reusable.
What You’ll Learn
- What content types are and how they differ from WordPress posts/pages
- Creating custom content types with fields through the admin UI
- Building dynamic listings with Views (no code required)
- Using revisions for content auditing and rollback
- Bulk operations and content moderation workflows
Why Structured Content Matters
Imagine you’re building a site for a university. You need to manage: news articles, faculty profiles, course listings, events, and research papers. Each type has different data.
Security note: Understanding Drupal Content Management helps build more secure applications — a core principle at DodaTech, where tools like Durga Antivirus Pro and Doda Browser rely on solid implementation practices.
In Drupal, you create five content types — each with its own fields (Article: body, image; Faculty: name, photo, department, bio; Course: code, title, credits, syllabus). The data is structured, meaning you can display “Upcoming Events in Computer Science” with a few clicks.
In WordPress, you’d stuff everything into post meta or custom fields. In Joomla, you’d use extensions. Drupal handles this natively.
flowchart LR
A["Drupal Overview & Installation"] --> B["Content Management<br/><strong>You are here</strong>"]:::current
B --> C["Menus, Blocks & Taxonomies"]
classDef current fill:#38bdf8,color:#0f172a,stroke-width:2px;
Default Content Types
Drupal installs with two default content types:
- Article — For time-sensitive content (news, blog posts). Comes with Tags field and comment settings.
- Basic Page — For static content (About, Contact). No tags, no comments.
Creating a Custom Content Type
- Go to Administration → Structure → Content types → Add content type
- Enter the Label (e.g., “Case Study”) — the machine name (
case_study) generates automatically - Configure submission form settings, publishing options, and display settings
- Click Save and manage fields
- Add fields — each field defines one piece of structured data:
Available field types include:
- Text (plain, formatted, long)
- Number (integer, float, decimal)
- File (generic file, image)
- Reference (entity reference, term reference)
- Date (date only, date + time)
- Link (URL + title)
- Email, Telephone, Address
Using Views for Dynamic Listings
Views is Drupal’s query and display system — and it’s part of core since Drupal 8. It lets you build dynamic listings without writing SQL or PHP.
Think of Views like creating a smart shopping list: you specify what items you want (published articles), how to sort them (newest first), how to display them (grid with image and title), and where to show the list (a page at /news or a block in the sidebar).
Creating a View
- Structure → Views → Add view
- Name your view (e.g., “Latest Articles”)
- Choose the Show entity type (Content, Taxonomy, Users, etc.)
- Configure:
- Format — Grid, Table, Unformatted list, HTML list
- Fields — Which columns/data to display (title, date, image)
- Filter criteria — Only published articles of specific content type
- Sort criteria — Newest first
- Page settings — Path (e.g.,
/news), items per page, pager type
- Save — your view is now accessible at
/news
Display Types
Each view can have multiple displays:
| Display | Purpose |
|---|---|
| Page | Visible at a specific URL (/news) |
| Block | Placed in a region (sidebar, footer) |
| Attachment | Attached to another display |
| Feed | RSS/Atom feed of the results |
| REST Export | JSON/XML API endpoint |
{# Override a view template in your theme #}
{# templates/views/views-view-unformatted--latest-articles.html.twig #}
<div class="latest-articles">
{% for row in rows %}
<article class="article-teaser">
<h3>{{ row.content['#node'].title.value }}</h3>
<time>{{ row.content['#node'].created.value|date('F j, Y') }}</time>
<div>{{ row.content['#node'].body.summary }}</div>
<a href="/node/{{ row.content['#node'].nid.value }}">Read more</a>
</article>
{% endfor %}
</div>Revisions
Drupal automatically stores revisions when enabled for a content type. Each revision captures the state of the content at that moment.
Why Revisions Matter
- Audit trail — See who changed what and when
- Rollback — Revert to any previous version
- Comparison — Compare two revisions side by side
- Content moderation — Require review before publishing (Draft → Review → Published)
Managing Revisions
- View revision history at
/node/{nid}/revisions - Click Revert to restore a previous version
- Enable revision log messages to track why changes were made
Bulk Operations
The Content page (/admin/content) supports bulk actions:
- Check multiple items using checkboxes
- Select an action from the dropdown:
- Publish / Unpublish
- Promote to front page / Remove from front page
- Stick / Unstick in listings
- Delete
- Click Apply to selected items
Using Drush for Batch Operations
# Delete all unpublished articles
drush node:delete article --status=0
# Delete nodes older than a specific date
drush sql:query "DELETE FROM node WHERE created < UNIX_TIMESTAMP('2024-01-01')"
# Reassign content from one user to another
drush sql:query "UPDATE node SET uid = 1 WHERE uid = 5"Creating Content
Creating an Article
- Content → Add content → Article
- Enter the Title
- Write the Body (CKEditor toolbar for formatting)
- Configure Tags — comma-separated terms or auto-complete
- Set Publishing options:
- Published — visible immediately
- Promoted to front page — shown on homepage
- Sticky at top of lists — pinned in listings
- Set Author and Created date (if needed)
- Click Save
Creating a Basic Page
Same process as articles but without the Tags field. Pages are typically not promoted to the front page.
Deleting Content
- Content → Find the item
- Click Delete in the dropdown menu
- Confirm deletion
Common Mistakes
1. Storing Structured Data in the Body Field
Putting structured data (images, files, dates) into the Body field as HTML defeats Drupal’s content modeling. Always create dedicated fields for structured data.
2. Overusing the Body Field for Complex Layouts
For complex layouts, use the Paragraphs module or Layout Builder instead of cramming everything into the Body field.
3. Ignoring Text Formats
Drupal uses text formats (Full HTML, Filtered HTML, Plain Text) to control allowed HTML tags per user role. If content disappears or looks wrong, check the text format.
4. Disabling Revisions
Always keep revisions enabled — they provide audit trails and the ability to roll back mistakes.
5. Not Using Field Groups
When a content type has many fields, group them with the Field Group module for a better editing experience.
Practice Questions
What is the difference between a content type and an entity type in Drupal?
Answer: A content type is a subtype of the Node entity type. Drupal has many entity types (User, Taxonomy Term, Comment, File). Content types are node-specific configurations.How is Views different from creating a custom PHP query?
Answer: Views provides a UI to build database queries without writing SQL or PHP. It handles pagination, caching, and display formatting automatically.What happens to content when you delete a content type?
Answer: All content of that type is also deleted. If you need to retire a content type but keep the data, unpublish content and disable the type via a custom module.Challenge: Create a “Portfolio Project” content type with fields for title, description (formatted text), project image (image field), and project URL (link field). Create a View that displays published projects in a 3-column grid. Add 3 sample projects.
FAQ
Try It Yourself
- Create a custom content type called “Team Member” with fields: Name (text), Bio (formatted, long), Photo (image), Department (term reference)
- Create a View that lists team members in a grid format
- Add a revision log message and then revert to an earlier revision
- Use Drush to unpublish all articles created before a specific date
What’s Next
| Topic | Description |
|---|---|
| Menus, Blocks & Taxonomies | Navigation, layout regions, and content classification |
| Themes, Layouts & Extensions | Twig templating, Layout Builder, and modules |
| HTML | Understanding Drupal’s output structure |
| CSS | Styling content types and views |
| PHP | The language behind Drupal modules |
What’s Next
Congratulations on completing this Drupal Content Management tutorial! Here’s where to go from here:
- Practice daily — Consistency is more important than long study sessions
- Build a project — Apply what you learned by building something real
- Explore related topics — Check out other tutorials in the same category
- Join the community — Discuss with other learners and share your progress
Remember: every expert was once a beginner. Keep coding!
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro