Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering Drupal 8
Mastering Drupal 8

Mastering Drupal 8: An advanced guide to building and maintaining Drupal websites

Arrow left icon
Profile Icon Sean Montague Profile Icon Chaz Chumley Profile Icon William Hurley
Arrow right icon
R$49.99 R$218.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (5 Ratings)
eBook Jul 2017 456 pages 1st Edition
eBook
R$49.99 R$218.99
Paperback
R$272.99
Subscription
Free Trial
Renews at R$50p/m
Arrow left icon
Profile Icon Sean Montague Profile Icon Chaz Chumley Profile Icon William Hurley
Arrow right icon
R$49.99 R$218.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (5 Ratings)
eBook Jul 2017 456 pages 1st Edition
eBook
R$49.99 R$218.99
Paperback
R$272.99
Subscription
Free Trial
Renews at R$50p/m
eBook
R$49.99 R$218.99
Paperback
R$272.99
Subscription
Free Trial
Renews at R$50p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Mastering Drupal 8

Site Configuration

Site configuration is probably one of the most important tasks any developer will need to perform when first creating a Drupal project. Establishing a baseline configuration for Drupal projects ensures that, as we begin to further develop our website, we have accounted for how users will be able to upload files, how dates will be displayed, and even how content will be cached.

However, sometimes site configuration can be overlooked as a few items get configured for us during the installation process; for example, Basic site settings such as the Site name, email address, and Regional settings. Depending on the size of your Drupal project, you may think why bother with any additional site configuration?

In this chapter, we will be exploring Drupal 8 from an administrator or site builder's point of view and explain why it is important to configure your site...

Assumptions

Mastering Drupal 8 assumes that you are already running a local AMP stack and are familiar with installing Drupal using the standard means of downloading, setting up a database, configuring a local host, and completing the browser-based install. In Chapter 1, Developer Workflow, we walked through quickly installing Drupal using Composer, Drush, and Drupal Console. Ensure that you have a working AMP stack and are comfortable working within the command-line interface using a Terminal window before continuing.

Exploring Drupal's interface

By default, Drupal has two interfaces we can work with. The first is what any visitor to our site will see, consisting of content and blocks displayed in various regions on the page. This is often referred to as the anonymous user's view:

The second interface, known as the administrator interface, requires us to be logged in to a Drupal instance. We can log in by clicking on the login link or by navigating to /user/login and entering the user credentials that were created when Drupal was first installed:

Once logged in we are considered to be authenticated and, since we are logged in as User one, which is the Super User, we are also considered to be an administrator and are presented with an Admin toolbar.

The Admin toolbar itself is separated into three different functional areas: Manage, Shortcuts, and admin. Each of these sections organize...

Basic site settings

Changes to the Site name, Email address, default front page, and error pages can all be configured under the Basic site settings of Drupal. This section of Drupal can often be overlooked since both the Site name and Email address fields are configured for us during installation. However, the Basic site settings control more than just these two fields, and it is important to know where they are located and how to modify these values using all the tools made available to us.

We can navigate to the Basic site settings by directly entering the URL of /admin/config/system/site-information, or by using the Admin toolbar and clicking on Manage | Configuration | Basic site settings:

The Basic site settings for Drupal contain three subsections:

  • SITE DETAILS
  • FRONT PAGE
  • ERROR PAGES
...

Configuration overrides

Managing configuration within Drupal does not always involve changing settings within the administrative panels of a specific section. In fact, Drupal also allows various settings to be configured within the settings.php file. Configuration settings within the settings.php file act as global overrides to those in the database. Some settings, as we will see, can only be set or modified from the settings.php file.

The settings.php file can be located within the /sites/default folder of a Drupal installation.

Keep in mind that the file permissions are set to read only; so, it is important to temporarily modify the permissions to be writeable before making any changes.

Once we have made the settings.php file writeable, we can open it within our favorite editor and locate the Configuration overrides section:

­

Reading through the Configuration overrides...

Using Drush to manage configuration

Drush allows us to perform a multitude of tasks using the command line to interact with Drupal. A handful of commands that allow us to manage configuration include drush config-list, drush config-get, and drush config-set. Let's look at how we would use each of these to manage Basic site settings.

Listing configuration variables

If we open a Terminal window and navigate to our Drupal instance, we can enter the following command to see a list of variables:

    drush config-list

Retrieving specific variables

We can also retrieve...

Assumptions


Mastering Drupal 8 assumes that you are already running a local AMP stack and are familiar with installing Drupal using the standard means of downloading, setting up a database, configuring a local host, and completing the browser-based install. In Chapter 1, Developer Workflow, we walked through quickly installing Drupal using Composer, Drush, and Drupal Console. Ensure that you have a working AMP stack and are comfortable working within the command-line interface using a Terminal window before continuing.

Exploring Drupal's interface


By default, Drupal has two interfaces we can work with. The first is what any visitor to our site will see, consisting of content and blocks displayed in various regions on the page. This is often referred to as the anonymous user's view:

The second interface, known as the administrator interface, requires us to be logged in to a Drupal instance. We can log in by clicking on the login link or by navigating to /user/login and entering the user credentials that were created when Drupal was first installed:

Once logged in we are considered to be authenticated and, since we are logged in as User one, which is the Super User, we are also considered to be an administrator and are presented with an Admin toolbar.

The Admin toolbar itself is separated into three different functional areas: Manage, Shortcuts, and admin. Each of these sections organize the functionality based on the tasks that need to be performed, which include everything from managing content, providing...

Basic site settings


Changes to the Site name, Email address, default front page, and error pages can all be configured under the Basic site settings of Drupal. This section of Drupal can often be overlooked since both the Site name and Email address fields are configured for us during installation. However, the Basic site settings control more than just these two fields, and it is important to know where they are located and how to modify these values using all the tools made available to us.

We can navigate to the Basic site settings by directly entering the URL of /admin/config/system/site-information, or by using the Admin toolbar and clicking on Manage | Configuration | Basic site settings:

The Basic site settings for Drupal contain three subsections:

  • SITE DETAILS
  • FRONT PAGE
  • ERROR PAGES

SITE DETAILS

The SITE DETAILS section contains the Site name, Slogan, and Email address fields. Depending on how an installation is completed, there will always be values for both Site name and Email address...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • The most up-to-date advanced practical guide on Drupal 8 with an in-depth look at all the advanced new features such as authoring, HTML markup, built-in web services, and more
  • If you are looking to dive deep into Drupal 8 and create industry-standard web apps, then this is the ideal book for you
  • All the code and examples are explained in great detail to help you in the development process

Description

Drupal is an open source content management system trusted by governments and organizations around the globe to run their websites. It brings with it extensive content authoring tools, reliable performance, and a proven track record of security. The community of more than 1,000,000 developers, designers, editors, and others have developed and maintained a wealth of modules, themes, and other add-ons to help you build a dynamic web experience. Drupal 8 is the latest release of the Drupal built on the Symfony2 framework. This is the largest change to the Drupal project in its history. The entire API of Drupal has been rebuilt using Symfony and everything from the administrative UI to themes to custom module development has been affected. This book will cover everything you need to plan and build a complete website using Drupal 8. It will provide a clear and concise walkthrough of the more than 200 new features and improvements introduced in Drupal core. In this book, you will learn advanced site building techniques, create and modify themes using Twig, create custom modules using the new Drupal API, explore the new REST and Multilingual functionality, import, and export Configuration, and learn how to migrate from earlier versions of Drupal.

Who is this book for?

This book is ideally suited to web developers, designers, and web administrators who want to dive deep into Drupal. Previous experience with Drupal is a must to unleash the full potential of this book.

What you will learn

  • Discover how to better manage content using custom blocks and views
  • Display content in multiple ways, taking advantage of display modes
  • Create custom modules with YAML and Symfony 2
  • Easily translate content using the new multilingual capabilities
  • Use RESTful services and JavaScript frameworks to build headless websites
  • Manage Drupal configuration from one server to another easily

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 27, 2017
Length: 456 pages
Edition : 1st
Language : English
ISBN-13 : 9781785886256
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jul 27, 2017
Length: 456 pages
Edition : 1st
Language : English
ISBN-13 : 9781785886256
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
R$50 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
R$500 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just R$25 each
Feature tick icon Exclusive print discounts
R$800 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just R$25 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total R$ 791.97
Mastering Drupal 8
R$272.99
Drupal 8 Blueprints
R$245.99
Drupal 8 Development Cookbook
R$272.99
Total R$ 791.97 Stars icon
Banner background image

Table of Contents

16 Chapters
Developer Workflow Chevron down icon Chevron up icon
Site Configuration Chevron down icon Chevron up icon
Managing Users, Roles, and Permissions Chevron down icon Chevron up icon
Content Types, Taxonomy, and Comment Types Chevron down icon Chevron up icon
Working with Blocks Chevron down icon Chevron up icon
Content Authoring, HTML5, and Media Chevron down icon Chevron up icon
Understanding Views Chevron down icon Chevron up icon
Theming Essentials Chevron down icon Chevron up icon
Working with Twig Chevron down icon Chevron up icon
Extending Drupal Chevron down icon Chevron up icon
Working with Forms and the Form API Chevron down icon Chevron up icon
RESTful Services Chevron down icon Chevron up icon
Multilingual Capabilities Chevron down icon Chevron up icon
Configuration Management Chevron down icon Chevron up icon
Site Migration Chevron down icon Chevron up icon
Debugging and Profiling Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(5 Ratings)
5 star 80%
4 star 0%
3 star 0%
2 star 0%
1 star 20%
D. Gutierrez Sep 28, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I was struggling to figure out what I needed to know first. I was coming from maintaining a Drpual 7 site to working on Drupal 8. However the environment was new to me. I had to understand Git, Composer, and the order of doing things.I love this book because it starts at the beginning and takes you through the steps to build the working environment. And from there it gets better and better. Perfect book to get you into the new environment, and easy to read. I would think it would be great for anyone new to Drupal as well. You can do a lot with Drupal, and quickly too. Great book.
Amazon Verified review Amazon
Sock Fight All Star May 29, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you're an experienced Drupal 7 developer or you just still feel clumsy in Drupal 8/9 because you keep forgetting some of the fundamentals even if you're already doing very advanced things elsewhere, this is a great book. It's about three years old at the time of this review, but this is still an excellent book. It's aged well.Drupal builders of all levels should find something useful in this book, but I think the people who would benefit the most from it are experienced developers who know how things work, but are just forgetful and need something to jog their memories. It's not a book that goes in depth about anything. It's an inch deep and a mile wide, which is exactly the kind of book I was hoping it would be.
Amazon Verified review Amazon
Stonewall Thomas Aug 05, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book has been great for going from Drupal 7 to Drupal 8. I must say that the first 2/3 of it isn't all that mind-blowing if you're already a Drupal 7 dev, but it does get to the good stuff later on.
Amazon Verified review Amazon
Cliente Amazon Apr 10, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book with good dynamics and great content. I understand that more detail about creating modules would make content much more efficient.
Amazon Verified review Amazon
Tom Judge May 09, 2021
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
The first chapter is outdated and instructions given do not work properly
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.