Drupal 8 Theming with Twig

Master Drupal 8’s new Twig templating engine to create fun and fast websites with simple steps to help you move from concept to completion

Drupal 8 Theming with Twig

Progressing
Chaz Chumley

16 customer reviews
Master Drupal 8’s new Twig templating engine to create fun and fast websites with simple steps to help you move from concept to completion
$35.99
$44.99
RRP $35.99
RRP $44.99
eBook
Print + eBook

Instantly access this course right now and get the skills you need in 2016

With unlimited access to a constantly growing library of over 3,500 courses, a subscription to Mapt gives you everything you need to get that next promotion or to land that dream job. Cancel anytime.

+ Collection
Free Sample

Book Details

ISBN 139781782168737
Paperback376 pages

Book Description

Drupal 8 is an open source content management system and powerful framework that helps deliver great websites to individuals and organizations, including non-profits, commercial, and government around the globe. This new release has been built on top of object-oriented PHP and includes more than a handful of improvements such as a better user experience, cleaner HTML5 markup, a new templating engine called Twig, multilingual capabilities, new configuration management, and effortless content authoring. Drupal 8 will quickly become the new standard for deploying content to both the web and mobile applications. However, with so many new changes, it can quickly become overwhelming knowing where to start and how to quickly.

Starting from the bottom up, we will install, set up, and configure Drupal 8. We’ll navigate the Admin interface so you can learn how to work with core themes and create new custom block layouts. Walk through a real-world project to create a Twig theme from concept to completion while adopting best practices to implement CSS frameworks and JavaScript libraries. We will see just how quick and easy it is to create beautiful, responsive Drupal 8 websites while avoiding the common mistakes that many front-end developers make.

Table of Contents

Chapter 1: Setting Up Our Development Environment
Installing an AMP (Apache, MySQL, PHP) stack
A quick tour of MAMP PRO
Installing Drupal 8
Reviewing the new admin interface
Using the project files
Summary
Chapter 2: Theme Administration
What is a theme?
Exploring the Appearance interface
Drupal's core themes
Theme states
Installing and uninstalling themes
Theme settings
Theme-specific settings
Using prebuilt themes
Manually installing a theme
Cleaning up our themes folder
Managing content with blocks
Managing custom blocks
Summary
Chapter 3: Dissecting a Theme
Setting up a local development environment
Default themes versus custom themes
Folder structure and naming conventions
Managing configuration in Drupal 8
Reviewing the new info.yml file
The role of templates in Drupal
Creating our first basic theme
Introducing Twig
Template variables
The role of the theme file in Drupal
Summary
Chapter 4: Getting Started – Creating Themes
Starter themes
Creating a Bootstrap starter
Creating a Jumbotron
Rethinking our layout
Using Twig templates
Subthemes
Touring Classy
Summary
Chapter 5: Prepping Our Project
Walking through the design mockup
Restoring our database snapshot
Creating a custom theme
Summary
Chapter 6: Theming Our Homepage
Creating our HTML wrapper
Creating our homepage
Implementing our Header Top region
Implementing our Header region
Implementing our Headline Region
Implementing our Before Content region
Implementing the footer
Summary
Chapter 7: Theming Our Interior Page
Reviewing the About Us mockup
Creating our interior page template
Adding our Global Header
Implementing our page title
Implementing our main page structure
Implementing our Team members section
Adding our global footer
Fixing JavaScript errors
Summary
Chapter 8: Theming Our Blog Listing Page
Reviewing the Blog Listing mockup
Creating our blog listing
Creating a Post Listing view
Managing our Post Listing block
Implementing our Node template
Creating a theme file
Creating a Categories block
Managing our Categories block
Implementing responsive sidebars
Theming a Block template
Drupal Views and Twig templates
Managing popular versus recent content
Adding the About Us block
Summary
Chapter 9: Theming Our Blog Detail Page
Reviewing the Blog detail mockup
Previewing our Blog detail page
Creating a Post Full template
Working with comments
Implementing social sharing capabilities
Summary
Chapter 10: Theming Our Contact Page
Reviewing the contact page mockup
Introducing contact forms
Contact page layout
Adding a Callout block
Integrating Google Maps into our contact page
Summary
Chapter 11: Theming Our Search Results
Reviewing the Search Results mockup
Looking at default Search results
Introducing core search
Working with Search Results templates
Search alternatives
Summary
Chapter 12: Tips, Tricks, and Where to Go from Here
Working with Local Tasks
Reusing Twig templates
Where do we go from here?
Summary

What You Will Learn

  • Navigate the Drupal 8 Admin interface
  • Build custom block layouts with reusable and fieldable blocks
  • Create subthemes based on the Bartik and Classy base themes
  • Construct a responsive theme with Twitter Bootstrap
  • Work with the new Twig PHP templating engine
  • Configure Drupal for Twig debugging
  • Enable preprocessing of Twig variables
  • Develop a theme from scratch following a step-by-step project outline

Authors

Table of Contents

Chapter 1: Setting Up Our Development Environment
Installing an AMP (Apache, MySQL, PHP) stack
A quick tour of MAMP PRO
Installing Drupal 8
Reviewing the new admin interface
Using the project files
Summary
Chapter 2: Theme Administration
What is a theme?
Exploring the Appearance interface
Drupal's core themes
Theme states
Installing and uninstalling themes
Theme settings
Theme-specific settings
Using prebuilt themes
Manually installing a theme
Cleaning up our themes folder
Managing content with blocks
Managing custom blocks
Summary
Chapter 3: Dissecting a Theme
Setting up a local development environment
Default themes versus custom themes
Folder structure and naming conventions
Managing configuration in Drupal 8
Reviewing the new info.yml file
The role of templates in Drupal
Creating our first basic theme
Introducing Twig
Template variables
The role of the theme file in Drupal
Summary
Chapter 4: Getting Started – Creating Themes
Starter themes
Creating a Bootstrap starter
Creating a Jumbotron
Rethinking our layout
Using Twig templates
Subthemes
Touring Classy
Summary
Chapter 5: Prepping Our Project
Walking through the design mockup
Restoring our database snapshot
Creating a custom theme
Summary
Chapter 6: Theming Our Homepage
Creating our HTML wrapper
Creating our homepage
Implementing our Header Top region
Implementing our Header region
Implementing our Headline Region
Implementing our Before Content region
Implementing the footer
Summary
Chapter 7: Theming Our Interior Page
Reviewing the About Us mockup
Creating our interior page template
Adding our Global Header
Implementing our page title
Implementing our main page structure
Implementing our Team members section
Adding our global footer
Fixing JavaScript errors
Summary
Chapter 8: Theming Our Blog Listing Page
Reviewing the Blog Listing mockup
Creating our blog listing
Creating a Post Listing view
Managing our Post Listing block
Implementing our Node template
Creating a theme file
Creating a Categories block
Managing our Categories block
Implementing responsive sidebars
Theming a Block template
Drupal Views and Twig templates
Managing popular versus recent content
Adding the About Us block
Summary
Chapter 9: Theming Our Blog Detail Page
Reviewing the Blog detail mockup
Previewing our Blog detail page
Creating a Post Full template
Working with comments
Implementing social sharing capabilities
Summary
Chapter 10: Theming Our Contact Page
Reviewing the contact page mockup
Introducing contact forms
Contact page layout
Adding a Callout block
Integrating Google Maps into our contact page
Summary
Chapter 11: Theming Our Search Results
Reviewing the Search Results mockup
Looking at default Search results
Introducing core search
Working with Search Results templates
Search alternatives
Summary
Chapter 12: Tips, Tricks, and Where to Go from Here
Working with Local Tasks
Reusing Twig templates
Where do we go from here?
Summary

Book Details

ISBN 139781782168737
Paperback376 pages
Read More
From 16 reviews

Read More Reviews