Drupal 8 Theming with Twig

Packt Publishing Ltd
Free sample

Master Drupal 8's new Twig templating engine to create fun and fast websites with simple steps to help you move from concept to completionAbout This Book
  • Create beautiful responsive Drupal 8 websites using Twig
  • Quickly master theme administration, custom block layouts, views, and the Twig template structure
  • A step-by-step guide to the most common approaches in web design
Who This Book Is For

This book is intended for front-end developers, designers, and anyone who is generally interested in learning all the new features of Drupal 8 theming. Discover what has changed from Drupal 7 to Drupal 8 and immerse yourself in the new Twig PHP templating engine. Familiarity with HTML5, CSS3, JavaScript, and the Drupal Admin interface would be helpful. Prior experience with setting up and configuring a standalone development environment is required as we will be working with PHP and MySQL.

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
In Detail

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.

Style and approach

Drupal 8 Theming with Twig is intended for front-end developers, designers, and anyone who is generally interested in learning all the new features of Drupal 8 theming. Discover what has changed from Drupal 7 to Drupal 8 and immerse yourself in the new Twig PHP templating engine. Familiarity with HTML5, CSS3, JavaScript, and the Drupal Admin interface would be helpful. Prior experience with setting up and configuring a standalone development environment is required as we will be working with PHP and MySQL.

Read more

About the author

Ever since Chaz can remember, he has been picking up a crayon, a pencil, a pen, or a computer, whether to draw a picture, write a poem, share an article, or develop the next great website. Looking back at these qualities, it's the reason why he chose to use those passions to give back to the open source community. His journey has opened doors to great experiences as a consultant, instructor, trainer, author, web developer, technical architect, Drupalist, and most importantly, a father. However, he could be none of these without first being a student and learning from life, love, and a passion for education, community development, and of course, science and technology. The sum of these things has allowed Chaz to share his experiences as an active member of the Drupal community, having participated in developing Lynda.com Drupal training videos, authoring multiple Drupal books for Packt Publishing, and giving back his knowledge by contributing numerous articles and presentations at NYCCamp, BadCamp, and DrupalCon, and bringing top-notch Drupal expertise to his clients' work. However, his greatest journey is still in front of him as he continues to learn new creative ways to architect open source websites, write about the next best things, and laugh with his colleagues along the way.

Read more
Loading...

Additional Information

Publisher
Packt Publishing Ltd
Read more
Published on
Mar 23, 2016
Read more
Pages
376
Read more
ISBN
9781782168744
Read more
Language
English
Read more
Genres
Computers / Web / Blogs
Computers / Web / Content Management Systems
Computers / Web / Design
Read more
Content Protection
This content is DRM free.
Read more
Read Aloud
Available on Android devices
Read more

Reading information

Smartphones and Tablets

Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.

Laptops and Computers

You can read books purchased on Google Play using your computer's web browser.

eReaders and other devices

To read on e-ink devices like the Sony eReader or Barnes & Noble Nook, you'll need to download a file and transfer it to your device. Please follow the detailed Help center instructions to transfer the files to supported eReaders.
Mastering Drupal can lead to a mighty website - discover what Drupal 8 can really do with hidden techniques, best practices, and more!About This BookThe 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 moreIf you are looking to dive deep into Drupal 8 and create industry-standard web apps, then this is the ideal book for youAll the code and examples are explained in great detail to help you in the development processWho This Book Is 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 LearnDiscover how to better manage content using custom blocks and viewsDisplay content in multiple ways, taking advantage of display modesCreate custom modules with YAML and Symfony 2Easily translate content using the new multilingual capabilitiesUse RESTful services and JavaScript frameworks to build headless websitesManage Drupal configuration from one server to another easilyIn Detail

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.

Style and approach

This book takes a practical approach with equal emphasis on examples and illustrative screenshots.

Accelerate your development process using Drupal 8 Views with this advanced, practical guideAbout This BookA practical, step-by-step guide with illustrative examples to give you a clear understanding of Drupal 8 viewsGet the only book on the market that talks about Drupal 8 views and their importance for developersGet an understanding of how views work and how they help to create modular applicationsWho This Book Is For

This book is for web developers, web designers, and website administrators who use Drupal 8, have some basic knowledge of managing and developing apps with Drupal, and who want to get an advanced, practical knowledge of views and how to leverage them in Drupal 8 applications.

What You Will LearnCreate displays of content that are automatically updated when you add new contentShow maps and rotating image carousels on your siteCombine content to create composite displays using the same data in different waysUse fields from more than one content type to create powerful views of multi-table dataModify the field data being displayed, combining it in different ways or changing the HTML that might be normally generatedAdd headers and footers above and below a views displayMake the output of your view look exactly like the designer specifiesChange the order in which a list of content is displayed, limit the content shown to only certain content types or valuesFilter content using values passed to the view in the URL, making a single view work different waysIn Detail

Learn how to build complex displays of content—all without programming.

Views were used on more than 80% of all Drupal 7 sites; now they are part of the Drupal 8 core. While most site builders and site owners are aware of views, they don't understand how to take full advantage of their power to create many amazing pages and blocks. If they use views, they might build 10 different view displays with different filters, without knowing that a contextual filter would require only a single display.

Using our sample company, we'll take its existing content and evolve an ever more complex and powerful website for that company, starting with adapting the administration the user sees and moving on to making complex pages of information for site visitors.

While the book is written for Drupal 8, the similarities between Views in Drupal 7 and 8 make this a useful reference for Drupal 7 site builders also.

Style and approach

This is the only advanced resource that will show you how to create, customize, and manage views in the Drupal 8 development environment. This has become more important since Drupal 8 has made views part of its core architecture.

Over 60 hands-on recipes that get you acquainted with Drupal 8's features and help you harness its powerAbout This BookDiscover the enhanced content authoring experience that comes with Drupal 8 and how to customize itTake advantage of the broadened multilingual and tools of the new version to provide an internationalized websiteThis step-by-step guide will show you how to deploy from development, staging, and production of a website with Drupal 8's brand new configuration management systemWho This Book Is For

This book is for those have been working with Drupal, such as site builders, back-end developers, and front-end developers, and who are eager to see what awaits when they start using Drupal 8

What You Will LearnExtend Drupal through contributed or custom modules and themesDevelop an internationalized website with Drupal's multilingual toolsIntegrate third-party front-end and back-end libraries with DrupalTurn Drupal into a web services provider using RESTCreate a mobile-first responsive Drupal applicationRun SimpleTest and PHPUnit to test DrupalUnderstand the plugin system that powers many of Drupal 8's new APIs to extend its functionalityGet to grips with the mechanics of the configuration management system and the ability to import and export site configurationIn Detail

Began as a message board, Drupal today is open source software maintained and developed by a community of over 1,000,000 users and developers. Drupal is used by numerous local businesses to global corporations and diverse organizations all across the globe. With Drupal 8's recent release and the exciting features it brings, this book will be your go-to guide to experimenting with all of these features through helpful recipes.

We'll start by showing you how to customize and configure the Drupal environment as per your requirements, as well as how to install third-party libraries and then use them in the Drupal environment. Then we will move on to creating blocks and custom modules with the help of libraries. We will show you to use the latest mobile-first feature of Drupal 8, which will help you make your apps responsive across all the major platforms. This book will also show you how to incorporate multilingual facilities in your sites, use web services and third-party plugins with your applications from inside Drupal 8, and test and deploy your apps

Style and approach

This practical, recipe-based book will provide you with actionable techniques and methods to improve your existing Drupal development skills. It will get you started with Drupal 8 and will be your reference guide to building new applications with Drupal.

Harness the power of Drupal 8 to create enterprise-grade, highly scalable websitesAbout This BookBuild complete, complex websites with no prior knowledge of web development entirely using the intuitive Drupal user interfaceEnsure your sites are modern, responsive and mobile-friendly through utilizing the full features available in Drupal 8Quickly master theme administration, custom block layouts, views, and the Twig template structureWho This Book Is For

This course is suitable for web developers, designers, as well as web administrators who are keen on building modern, scalable websites using Drupal 8 and its wide range of new features

What You Will LearnSet up a local “stack” development environment and install your first Drupal 8 siteFind out what is available in the Drupal 8 coreIntegrate third-party front-end and back-end libraries with DrupalUnderstand the plugin system that powers many of Drupal 8's new APIs to extend its functionalityBuild custom block layouts with reusable and fieldable blocksWork with the new Twig PHP templating engineDevelop a theme from scratch following a step-by-step project outlineIn Detail

This Drupal 8 course takes you through the journey of building, extending, and customizing websites to build highly scalable and enterprise-ready websites.

The first part—Learning Drupal 8—takes you step by step through building a Drupal 8 website. You will start with the basics, such as setting up a local “stack” development environment and installing your first Drupal 8 site, then we move on to image and media handling and extending Drupal modules. This section will help you get to grips with the modular nature of Drupal, and you'll learn how to extend it by adding new functionalities to create your new modules. After learning to develop and manage a modern and responsive website using Drupal 8, you'll start exploring different techniques to take advantage of the new Drupal 8 features.

The next module—Drupal 8 Development Cookbook—is your go-to guide to experimenting with all of Drupal 8's features through helpful recipes. You will explore techniques to customize and configure the Drupal environment, create blocks and custom modules, as well as make your web apps responsive by harnessing the mobile-first feature of Drupal 8. This module will also show you how to incorporate multilingual facilities in your sites, use web services and third-party plugins with your applications from inside Drupal 8, and test and deploy your apps.

In the third part—Drupal 8 Theming with Twig—you will master Drupal 8's new Twig templating engine to customize the look and feel of your website. This section will walk you 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. You 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. By the end, you will have learned how to develop, manage, extend, and customize an enterprise-level website.

This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products:

Learning Drupal 8 by Nick Abbott and Richard JonesDrupal 8 Development Cookbook by Matt GlamanDrupal 8 Theming with Twig by Chaz ChumleyStyle and approach

This course offers a thorough coverage of developing, managing, extending, and designing highly scalable websites using the Drupal 8 platform. Filled with practical examples and recipes, this course is a great combination of example-driven learning complemented by interesting techniques to take advantage of the Drupal platform.

Mastering Drupal can lead to a mighty website - discover what Drupal 8 can really do with hidden techniques, best practices, and more!About This BookThe 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 moreIf you are looking to dive deep into Drupal 8 and create industry-standard web apps, then this is the ideal book for youAll the code and examples are explained in great detail to help you in the development processWho This Book Is 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 LearnDiscover how to better manage content using custom blocks and viewsDisplay content in multiple ways, taking advantage of display modesCreate custom modules with YAML and Symfony 2Easily translate content using the new multilingual capabilitiesUse RESTful services and JavaScript frameworks to build headless websitesManage Drupal configuration from one server to another easilyIn Detail

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.

Style and approach

This book takes a practical approach with equal emphasis on examples and illustrative screenshots.

Harness the power of Drupal 8 to create enterprise-grade, highly scalable websitesAbout This BookBuild complete, complex websites with no prior knowledge of web development entirely using the intuitive Drupal user interfaceEnsure your sites are modern, responsive and mobile-friendly through utilizing the full features available in Drupal 8Quickly master theme administration, custom block layouts, views, and the Twig template structureWho This Book Is For

This course is suitable for web developers, designers, as well as web administrators who are keen on building modern, scalable websites using Drupal 8 and its wide range of new features

What You Will LearnSet up a local “stack” development environment and install your first Drupal 8 siteFind out what is available in the Drupal 8 coreIntegrate third-party front-end and back-end libraries with DrupalUnderstand the plugin system that powers many of Drupal 8's new APIs to extend its functionalityBuild custom block layouts with reusable and fieldable blocksWork with the new Twig PHP templating engineDevelop a theme from scratch following a step-by-step project outlineIn Detail

This Drupal 8 course takes you through the journey of building, extending, and customizing websites to build highly scalable and enterprise-ready websites.

The first part—Learning Drupal 8—takes you step by step through building a Drupal 8 website. You will start with the basics, such as setting up a local “stack” development environment and installing your first Drupal 8 site, then we move on to image and media handling and extending Drupal modules. This section will help you get to grips with the modular nature of Drupal, and you'll learn how to extend it by adding new functionalities to create your new modules. After learning to develop and manage a modern and responsive website using Drupal 8, you'll start exploring different techniques to take advantage of the new Drupal 8 features.

The next module—Drupal 8 Development Cookbook—is your go-to guide to experimenting with all of Drupal 8's features through helpful recipes. You will explore techniques to customize and configure the Drupal environment, create blocks and custom modules, as well as make your web apps responsive by harnessing the mobile-first feature of Drupal 8. This module will also show you how to incorporate multilingual facilities in your sites, use web services and third-party plugins with your applications from inside Drupal 8, and test and deploy your apps.

In the third part—Drupal 8 Theming with Twig—you will master Drupal 8's new Twig templating engine to customize the look and feel of your website. This section will walk you 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. You 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. By the end, you will have learned how to develop, manage, extend, and customize an enterprise-level website.

This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products:

Learning Drupal 8 by Nick Abbott and Richard JonesDrupal 8 Development Cookbook by Matt GlamanDrupal 8 Theming with Twig by Chaz ChumleyStyle and approach

This course offers a thorough coverage of developing, managing, extending, and designing highly scalable websites using the Drupal 8 platform. Filled with practical examples and recipes, this course is a great combination of example-driven learning complemented by interesting techniques to take advantage of the Drupal platform.

©2018 GoogleSite Terms of ServicePrivacyDevelopersArtistsAbout Google|Location: United StatesLanguage: English (United States)
By purchasing this item, you are transacting with Google Payments and agreeing to the Google Payments Terms of Service and Privacy Notice.