Skip to main content
Drupal 9: Create an archive grouping content types by month and year

Objective:

Having already defined a content type, we want to group them by month and year of creation using a view like the one shown in the image below.

Image 1

Prerequisites:

To follow this tutorial, you must have the following in your Drupal 9 environment:

  • A content type
  • A view whose role is to display the various data from your content type, which we will configure

NB: This tutorial does not cover customizing the display of your archive view, but only setting it up in the most basic way possible, as you can see in the image above.

When creating your view, you must select “Create a page.”

 

Basic display:

When you create your view (without styles), you have the following configurations available to you

fig 2
fig2

Configure the two areas currently visible in fig. 2 according to your preferences. The section we are interested in here is “Advanced.”

fig3
fig3
fig4
fig 4

 

Profile picture for user vysti Vysti

Écrit le

Il y'a 2 years
Modifié
Il y'a 2 weeks
Loading ...
WhatsApp
Support Habeuk : +237 694 900 622
WhatsApp Send