Drupal Events in August
Blog postCheck out the events that we're sponsoring in August, where you can win a free Drupalize.Me membership.
New Free Series: Coding Standards
Blog postToday, we’re happy to announce a new free series about Drupal Coding Standards that has been made possible by our friends at Chromatic. The Drupal community has defined a set of coding standards and best practices that you should adhere to whenever you're writing code for Drupal.
Linking to things is probably one of the first things you learned how to do as a web developer. Anchor tags are the framework of how the world wide web works. So it's important to know how to create them in Drupal. Chances are you'll be doing a lot of it.
Creating links to things in Drupal, however, is a bit more complicated than just typing out an HTML anchor tag. It requires understanding how URLs are generated from routes, and how to define links as renderable arrays. It can also be tricky because of the multitude of deprecated, but still functioning, ways of creating links.
In this tutorial we'll:
- Use the
\Drupal\Core\Url
class to generate URL objects from routes and external URIs. - Use the
\Drupal\Core\Link
class to create HTML links within a Drupal module. - Examine best practices for working with URLs and links in a Drupal module in order to ensure that your code continues to work into the future.
By the end of this tutorial you should be able to link to anything, either internal to your application or external, using Drupal best practices.
We’ve completed a major overhaul in how our tutorials are organized on Drupalize.Me. Take a look at the new Guides page and find something to new to learn about Drupal.
We’re getting ready to run another iteration of our popular Hands-On Drupal Theming workshop on July 19th, 20th, and 21st, something we haven’t done for over a year as we’ve been focused on teaching Drupal 7 to Drupal 9/10 migrations. In the process of getting ready, I’ve been going through my slides for the workshop and making some updates. Here are the things that jump out to me as important (but work-in-progress) changes in the last year.
DrupalCon Nashville is right around the corner and we're stoked to not only be attending DrupalCon, but to also be providing our Drupal 8 Theming workshop once again.
Custom themes in Drupal must be configured to inherit settings, templates, and other assets from a parent theme. Which base theme you use is configurable. This allows theme developers to use a different set of markup as the starting point for their theme, organize various theme assets into a more maintainable structure, and more. All of this is made possible because of how Drupal's theme layer uses a chain of inheritance when assembling all the parts of a theme.
Base themes are also a powerful way to encapsulate standards and best practices into a reusable code base. You'll find dozens of contributed base themes on Drupal.org that can serve as a great starting point, especially if you're planning to work with an existing design framework like Bootstrap or Susy Grids. Or if you want to leverage modern JavaScript bundling without setting up Webpack on your own.
In this tutorial we'll:
- Learn what base themes and subthemes are
- Look at a few examples of template inheritance and how that works
- Discuss some use cases for theme inheritance
By the end of this tutorial you'll know how to declare the base theme that your theme builds upon.
DrupalCon Global Day 3
Blog postIt's day 3 summary of DrupalCon Global 2020 and it delivered again. It’s been a whirlwind 3 days full of good content and meeting lots of people new and old. This is the last set of summary notes for sessions, as today we switch over to contribution day.
We're excited to announce a new partnership with KNP Labs to provide our members with expert PHP and Symfony2 lessons.
Drupalize.Me Goes to Washington
Blog postIf you’re headed to GovCon and want to learn some awesome Drupal 8 theming, sign up for our all-day workshop.
What is Drupal (8)?
Blog postWith the release of Drupal 8 approaching, it’s time again to answer and update the age old question: What is Drupal?
We're Teaching at DrupalCon Baltimore
Blog postThe DrupalCon Baltimore training schedule was announced earlier today and we're stoked to not only be attending DrupalCon, but to also be providing our Drupal 8 Theming workshop, and having Amber, Blake, and Joe presenting sessions. It's going to be a great con!
Drupalize.Me will be offering our Drupal 8 Theming workshop at Twin Cities DrupalCamp on June 22nd, as well as delivering sessions and attending the sprints. We would love to see you there.
A month or so ago the Drupalize.Me team started a discussion on how to start helping others learn Drupal 8. We knew Drupal 8 wasn't ready for our typical curriculum and video production process, but thought you would be interested to learn along with us about Drupal 8 as it continues to evolve. This blog post is the kick off to that series. As we stated in a recent podcast where we announced this idea, we need everyone to understand that the things we discuss are still in development and could change, or even be removed from D8 altogether.
A look at how we design our remote workshops for flexibility and on-the-fly adjustments so that we can provide as much value as possible to the people who choose to attend.
Modules can define new asset libraries that include CSS and JavaScript files, and then attach them to the content they output. This process involves defining a new asset library, authoring the related CSS and JavaScript, and using the #attached
render array property to associate the library with the applicable content.
In this tutorial, we'll:
- Define a new asset library in the anytown module.
- Include CSS and JavaScript in the library.
- Attach the new library to the /weather page.
By the end of this tutorial, you should be able to define an asset library and add CSS and JavaScript to a page from a Drupal module.
Twin Cities DrupalCamp is coming up -- June 7th-10th -- and we'll be attending and presenting our popular Theming Drupal 8 workshop.
#prefix
and #suffix
are two commonly used examples of standard properties. That is, they are available for use on any element in a render array regardless of the element #type
or #theme
property's value. They are a great way to add additional layout markup to an element in a theme-agnostic way.
In this tutorial we'll:
- Use the
#prefix
and#suffix
Render API properties to wrap an element - Look at some possible use cases for using
#prefix
and#suffix
in your own code
By the end of this tutorial you should know how, and when, to use the #prefix
and #suffix
properties in a render array.
A Drupal module encapsulates files and directories that serve a specific purpose and follow Drupal's standards and conventions. This tutorial describes the anatomy of a Drupal module, focusing on the placement and purpose of different file types.
In this tutorial, we'll:
- Explain where Drupal looks for modules and where you should place your custom module.
- Describe the standard file and directory types in a module.
By the end of this tutorial, you should be able to identify and understand the purpose of various files and directories within a Drupal module and know where to correctly place them.