LocalGov Drupal: Creating Sensible Defaults in your Theme

We often end up with a lot of templates when theming, but we should also remember to create "sensible defaults", so before you start theming specifically your site doesn't look broken.

Add sensibile defaults to a Drupal theme - localgov_drupal

Writing sensible defaults means that the dev we might perform or the CSS we might write for a new feature/component is additive, and you do not need to reset libraries and/or write code to overwrite other code. Here's an outline of creating sensible defaults for our region template within the new localgov_base theme - region.html.twig.

I've started streaming some of my work, especially if it's contributions to open source, on twitch if you'd like to follow along/subscribe. As it turns out, Twitch deletes your videos after 14 days, so I have also been uploading them to YouTube. Feel free to subscribe.

Filed Under:

  1. Drupal Planet
  2. Drupal
  3. Twig
  4. HTML
  5. Frontend Development