Styling the search results page
Drupal core provides a simple module to perform searches, but it’s tailored to a very simple websites that doesn’t need any advanced features.
On the demo website, we’ll use the Search API contributed module (https://www.drupal.org/project/search_api). One of the main advantages of Search API is that for every search index, the module provides us with a data source that we can use in a view.
The demo website defines a view that queries the search index; you can find it at https://packt.ddev.site/search.
The search view renders indexed contents (nodes) using a specific display mode called Search index. Check the configuration of every content type to see that such a display mode is present in any of them.
Using a specific display mode for search results is not mandatory, but it’s useful to normalize every content type to render a uniform markup. Having a unique display mode for every content type allows us to define...