Book Image

Learning Drupal 8

By : Nick Abbott
Book Image

Learning Drupal 8

By: Nick Abbott

Overview of this book

Drupal 8 sets a new standard for ease of use, while offering countless new ways to tailor and deploy your content to the Web. Drupal 8 allows user to easily customize data structures, listings, and pages, and take advantage of new capabilities for displaying data on mobile devices, building APIs, and adapting to multilingual needs. The book takes you step by step through building a Drupal 8 website. Start with the basics, such as setting up a local “stack” development environment and installing your first Drupal 8 site, then move on to image and media handling, and extending Drupal modules. Push your knowledge by getting to grips with the modular nature of Drupal, and learning to extend it by adding new functionalities to create your new modules. By the end of the book, you will be able to develop and manage a modern and responsive website using Drupal.
Table of Contents (21 chapters)
Learning Drupal 8
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Statistics


The Statistics module allows you to collect data about the visitors to your site. When the module is active, the number of times each piece of content is viewed is counted.

Enable the Statistics module now, and you will see a configuration screen available by navigating to Configuration | System | Statistics (admin/config/system/statistics):

Enable the collection of stats by ticking the Count content views option:

You'll then have access to a new block, which is initially entitled Popular content.

Visit Manage | Structure | Block layout and place the block.

Click on the Place block button now:

Choose to place the Popular content block.

This block can be configured to show a list of content that is:

  • Most popular for the current day

  • Most popular for all time (since the module was enabled)

  • Most recently viewed

There are multiple sets of options available in this screen, but we'll only set the Number of day's top views to display for now, and we'll place the block in the Sidebar second region...