You can create templates for Drupal views using the Layout builder. Technically, a template is a View format.
Before you create your view template: View templates provide the structure for your View page or Block and use View modes to display each result. For example, you may choose to show each result using the Teaser view mode. For this reason, before you create your View template, you should create a template for the View mode you intend to use within your View. View mode templates are created within Content templates.
The first step is to create your View template format without any layout. Don't worry about layout for now, you'll add that later.
To create a View template:
The second step is to create your View and select your View template (created in step 1) as the View format:
To create your View:
In Step 1, you created a View template so that it could be selected within your View in Step 2. Now you can layout your View template using the Layout builder.
To layout your View template:
The diagram below shows how the View elements must be nested within each other.
Now that you've created both your View and your View template, you can preview it by going to your View URL. If you don't know what this is, edit your View and then look for the Path under Page settings. Note: You must have populated some nodes for your View to display them.
You can use other content and layout elements in your View template to provide additional layout and content. The important factor is that the View elements are nested within each other in the correct order. The screenshot below shows how the View elements can be used together with other content and layout elements to create a complete template for your View page or block.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Fri Jul 04 2025 17:10:07 GMT+0000 (Coordinated Universal Time)