In this tutorial, we'll use an essential tool for Drupal 8 development: the Drupal Console. We'll take a look at how to list the commands available in Drupal Console and then use a Drupal Console command to clear the route cache.
Note: See the Drupal Console docs "Getting the project" page for the latest information on how to install Drupal Console. You will need to use Composer to install Drupal Console for each project.
Additional resources
Drupal Console — Download and Documentation
Drupal Console: Getting the Project
Tutorial: Drupal Console (Drupalize.Me)
Composer
Let's Debug Twig in Drupal 8!
Blog postWhen I am theming a Drupal site, I need to know which variables are available on a template file. In Drupal 8, the template engine is Twig, so we’re going to need to know a little bit of Twig to make this work. So, if Twig is totally new to you, don’t worry. Today, you’ll learn some Twig!
Release Day: More Twig Tutorials
Blog postThis week, Leanna Pelham of KnpUniversity continues to show you how to become a Twig expert by demonstrating Twig goodies such as template inheritance, functions, tests, for and if syntax, debugging techniques, macros, and other advanced tips and tricks. Each lesson is a bite sized tutorial and includes downloadable site code that will get you up and running with Twig without getting overwhelmed.
Drupal 8.0.0 Released
Blog postIt's finally here! Drupal 8.0.0 was just released, and our team is busy producing new tutorials.
14.3. Learning More
FreeHow to find additional material to gain advanced site-building skills.
This week we have a ton of new tutorials for you to enjoy. We're very happy to bring back our friends from KnpUniversity to provide a great little series on the Twig templating system, and we're also wrapping up the entire O'Reilly Using Drupal book series with the final tutorials.
We're super excited to release a new series this week, which has been a highly requested one on our suggestion list: PSD to Drupal Theme. This series walks you through the process of converting a static design into a Drupal theme. We'll be covering strategies for breaking down your design into Drupal pieces, extracting your design assets, and working with those components in your CSS. Along the way you're going to also be introduced to grid frameworks, Sass, and other very helpful general web development tools. At the end you will have a theme that you can install and enable on your Drupal site. Having a little bit of Drupal site building experience, and a little bit of Web experience (HTML and CSS) will be helpful but it's not required, so if you find the world of Drupal themes mysterious, this is a great series to clear the fog.
Drupal 8 Is 1 Year Old
Blog postIt’s hard to believe, but it has been 1 year since Drupal 8.0 was released to the world. We’re celebrating Drupal 8’s first birthday on November 19th by giving FREE access to our full Drupal 8 Migration Guide over the celebration weekend! This Saturday, November 19th through Monday, November 21st you can learn how to use the new core migration system to upgrade your Drupal site or import content from external sources. It’s time to get using Drupal 8!
It's time to create the bare-bones structure for a new theme on your site. You should try to complete this exercise based on the information you've learned in this chapter. The video included will walk you through the implementation of this exercise if you need some help. In this exercise you will need to:
- Create an info file that describes a custom theme to Drupal with the regions listed below (we're going to name ours "reboot").
- Enable, and view, a bare-bones custom theme.
Regions:
'Header' (header)
'Primary menu' (primary_menu)
'Secondary menu' (secondary_menu)
'Page top' (page_top)
'Page bottom' (page_bottom)
'Highlighted' (highlighted)
'Featured top' (featured_top)
'Breadcrumb' (breadcrumb)
'Content' (content)
'Sidebar first' (sidebar_first)
'Sidebar second' (sidebar_second)
'Footer first' (footer_first)
'Footer second' (footer_second)
Note: At the end of this exercise, you'll find a video walk-through of the solution.
Just two weeks ago we launched our new format for guides, along with a landing page that presents our guides and topics on one page. This week we’re pleased to add 2 more new guides to the list: Introduction to Drupal and Learn Drupal 8. Both of these guides provide overviews that answer common questions and point you in the right direction to get started with Drupal.
Drupal Events and Membership Giveaways
Blog postWe're thankful to the volunteers around the world who support the community by running camps. We've partnered up with several of them as sponsors and to give away free Drupalize.Me memberships. Get yourself to one of these events and you can win a free month of Drupalize.Me! Here is a list of upcoming events where you can win a free membership in the next 2 months.
We've updated our Configuration Management series with new tutorials on deployment workflows as well as updated tutorials on managing and inspecting configuration with Drush (now with Drush 9 commands). We've also done some re-arranging and moved our tutorials about using Drupal's Configuration API in a module to a new series, Configuration Entities. Finally, we've added a new tutorial on setting up and using Drush Site Aliases, since this is a prerequisite for completing the new tutorial Live vs. Local Configuration Management. Happy configuration managing!
Drupal 8 Survey Insights
Blog postLast month we asked the Drupal community a few questions. We received 243 responses to our survey, and we'd like to share some of the information. While we're not making scientific generalizations from this data, it is an interesting picture of our community nonetheless. A big thank you to everyone who participated in the survey.
Here are 4 things we learned:
Now that we understand what templates are and how we can use them, let's override some templates! In this tutorial we'll copy the views wrapper template to our theme and override it so that we can customize the markup for the Baseball Players view. Then we'll modify the template so that our view's pager appears both above and below our table of players.
Drupal media entities are fieldable entities, which means that you can add any custom fields you want to your Media types. These fields can be used for collecting additional metadata about a resource, categorizing and organizing resources so they're easier to find in a large media library, or for displaying information like a photo credit or transcript for a video. The possibilities are endless once you know how to add, and optionally display, fields in Drupal.
Some example use cases for adding fields to Media types:
- Collect, and display, a credit to go along with a photo. This could also be a date, a location, or any other metadata.
- Store resource width and height dimensions as custom fields so they can be referenced by display logic in the theme layer.
- Use Taxonomy reference fields to add tags or categories to help keep a large library organized.
In this tutorial we'll:
- Learn how to add fields to a Media type
- Verify our new custom field is working
By the end of this tutorial you'll know how to add custom fields to any Media type.
New Series: Coding for Views
Blog postViews is without a doubt the most popular module on drupal.org, and one of the reasons for it’s popularity is the plethora of modules that enhance the out of the box views experience. These modules add new display options like a calendar or Javascript caoursel, new formatters for existing fields, and even new backends so you can query things other than MySQL. Like Drupal itself views is written to be extended and it’s not uncommon to need to do just that in order to meet your site specific requirements.
Overview of development sites with an example deployment workflow for site building.
Release Day: Views for Developers
Blog post10 years ago we released the first tutorials in our Drupal 7 Coding for Views Series. Today we're super excited to release the first 8 tutorials in our new Views for Developers series, a Drupal 8+ update to Coding for Views.
DrupalCon Baltimore Tuesday, April 25th
Blog postDrupalCon Baltimore officially started yesterday, on April 24th with summits and workshops, and the arrival of thousands of Drupalers from around the world. The Drupalize.Me team delivered a hands-on workshop for Drupal 8 theming to a sold-out room, and kicked off the conference socializing at the official opening reception.
Today, Tuesday, April 25th is the first day of sessions, and it kicks off with the first keynote, by Dries Buytaert, also known as the Driesnote. The Driesnote is also always preceded by the Pre-note, for the early risers. After a full day of sessions and birds of a feathers, the Women in Drupal meetup will be happening at Luckie's Tavern from 6 to 8 p.m. tonight.
How We Archived Outdated Tutorials
Blog postYou might have noticed some changes on Drupalize.Me lately. We’ve just wrapped up a huge content archiving project and I’d like to share what we did and how this will help us move forward with a library of tutorials for Drupal learners that we’re committed to keeping up-to-date.