How to Add, Edit, and Configure Views in Drupal 11 (Step-by-Step Tutorial)
Views are one of the most powerful features in Drupal. They allow you to display content dynamically—whether it’s blog posts, products, users, or custom data—without writing code.
In this tutorial, you’ll learn how to add, edit, and configure Views in Drupal 11 with simple, practical steps.
What Are Views in Drupal?
A View is a customizable list of content pulled from your database. You can use it to create:
- Blog listings
- News pages
- Product catalogs
- User directories
- Custom dashboards
With Drupal 11, Views are part of the core—no extra installation needed.
Before You Start
Make sure:
- You have Drupal 11 installed
- You’re logged in as an administrator
- The Views module is enabled (it is by default)
➕ Step 1: How to Add a New View
1. Navigate to Views
Go to:
Structure → Views → Add view
2. Fill in Basic Settings
You’ll see a form with several options:
- View name → e.g., Latest Articles
- Show → Choose content type (e.g., Content, Users, Taxonomy)
- Of type → Select a specific content type (e.g., Article)
3. Configure Page Display
Check:
- ✔ Create a page
Then configure:
- Page title → "Latest Articles"
- Path →
/latest-articles - Display format → Unformatted list / Grid / Table
- Items per page → e.g., 10
4. Save the View
Click Save and edit
You’ve just created your first View!
Step 2: How to Edit a View
Once saved, you’ll be taken to the Views UI editor.
Key Sections Explained
- Displays (left column)
Page, Block, Feed, etc. - Format (middle)
Controls layout (list, grid, table) - Fields / Filters / Sort Criteria (right)
Where the real customization happens
Editing Fields
Fields control what content is displayed.
To add a field:
- Click Add under Fields
- Search (e.g., Title, Image, Body)
- Select and click Add and configure fields
- Adjust settings (label, format, etc.)
- Click Apply
Example:
- Add Title
- Add Featured Image
- Add Created Date
Adding Filters
Filters control which content appears.
Example: Show only published content
- Click Add under Filter criteria
- Select Published (= Yes)
- Apply
Example: Filter by content type
- Add Content: Type
- Choose Article
Adding Sort Criteria
Sort controls the order of results.
Example: Show newest first
- Click Add under Sort criteria
- Select Content: Created date
- Choose Descending
Changing Display Format
Under Format, you can choose:
- Unformatted list
- Grid
- Table
To customize:
Click Settings next to the format and adjust:
- Number of columns (for grid)
- Table fields
- Styling options
Step 3: Configure Advanced View Settings
Pagination
Control how many items display per page:
- Go to Pager
- Choose:
- Full pager
- Mini pager
- Display all items
Add a Block Display
Want to show your View in a sidebar?
Steps:
- Click + Add under Displays
- Select Block
- Configure fields and filters
- Save
Then place it:
Structure → Block layout
Add Contextual Filters (Dynamic Content)
Contextual filters let your View change based on the URL.
Example:
Display articles by author dynamically.
- Add Content: Author (uid) as a contextual filter
- Configure:
- When value is not available → Provide default value
- Choose User ID from logged-in user
Add Exposed Filters (User Search)
Allow users to filter content from the frontend.
Example:
- Add a filter (e.g., Title)
- Check Expose this filter to visitors
- Save
Now users can search or filter results directly.
Add Relationships (Advanced)
Relationships connect related data.
Example:
Show content along with author details:
- Add relationship → Content: Author
- Add fields like:
- Author name
- Profile picture
Step 4: Save and Test Your View
- Click Save
- Visit your page URL (e.g.,
/latest-articles) - Verify:
- Content displays correctly
- Filters work
- Layout looks good
Pro Tips for Drupal 11 Views
- Keep Views lightweight for better performance
- Use caching settings when dealing with large datasets
- Reuse Views by adding multiple displays (Page + Block)
- Use Single Directory Components (SDC) for advanced theming
Common Use Cases
- Blog listing page
- Event calendar
- Product grids
- Search result pages
- Custom admin dashboards
Final Thoughts
Views in Drupal 11 give you complete control over how content is displayed—without coding. Once you understand fields, filters, and displays, you can build almost any layout or data-driven page.
Start simple, experiment with configurations, and gradually explore advanced features like contextual filters and relationships.
- Log in to post comments