Creating a block of recent blogs
In the last recipe, we created a page using the Views module to list articles in the Drupal site to build a blog. A view can contain multiple displays. Each display inherits defaults, such as its style and row format, filters, sorts, pager, and more. Each display type might have unique settings, such as the page settings where the menu link was configured in the previous recipe. In this recipe, we will add a block display so that we can list the five most recent articles by title anywhere on the site.
How to do it…
- Go to Structure and then Views. This will bring you to the administrative overview of all the views that are created.
- Find the Blog view that was created in the previous recipe and click on Edit.
- Under Displays, where it says Page, click on the Add button and select Block from the drop-down menu. This will create a new block display, which we can configure:
Figure 3.4 – The menu...