Advanced Components
  • Welcome
  • Start here
    • Setup
    • Dependencies
  • Getting Started
    • Front-end tooling
    • Create a new D9 theme
    • Component Architecture
    • Drupal Best Practices
    • Drupal Attributes
    • Twig Blocks
  • Basic Components
    • Global styles
    • Adding webfonts
    • Heading Component
      • Improving the Heading
    • Button Component
  • A component's lifecycle
    • Hero Component
    • Include statements
    • Drupal prep
    • Drupal entities
    • Homepage content type
    • View modes
    • Add Hero to homepage
    • Drupal cache & twig debugging
    • Twig template suggestions
    • Getting field values
    • Integrating the Hero
    • Drupal Libraries
    • Hero Image styles
  • Card component
    • Card Component
    • Component Variants
    • Card Variant
    • Author component
  • Drupal site building
    • Blog articles
    • View modes
    • Drupal Views
    • Author
    • Generate content
    • Adding Blog Lists to the Homepage
  • Drupal Integrations
    • Integrating the Card
      • Taxonomy terms
    • Integrating the Card Wide
    • Author integration
    • From our blog
    • Integrating From our blog
    • Featured Content
    • Integrating Featured Content
    • Blog image styles
    • Blog detail page
  • Extras
    • Image Styles
    • Navigation
  • Resources
    • Resources
Powered by GitBook
On this page
  • Exercise: Enable the new theme
  • Exercise: Disable CSS/JavaScript Aggregation
  • Exercise: Enable modules

Was this helpful?

  1. A component's lifecycle

Drupal prep

Before we can dive into building our component's infrastructure in Drupal, we need to get a few things ready. Perform each of the tasks below:

Exercise: Enable the new theme

Enabling our new theme is not required to build Drupal's back-end for the Hero, but it's something we need to do at some point. Let's do it now:

  1. From Drupal's Admin Toolbar click Appearance

  2. Scroll to the Uninstalled themes section where you will find the new theme you created. It should have a thumbnail image with the Mediacurrent logo

  3. Click Install and set as default under the theme name

Exercise: Disable CSS/JavaScript Aggregation

For some reason, Drupal core comes with CSS and Javascript Aggregation turned on out of the box. Although this is highly recommended on production websites, during development it is recommended we turn aggregation off. This will ensure CSS and Javascript code we write will be instantly available on our drupal pages without having to continuously clearn Drupal caches.

  1. From Drupal's Admin toolbar click Configuration > Development > Performance

  2. Clear both check boxes: Aggregate CSS files & Aggregate JavaScript files

  3. Click the Save configuration button

  4. While you're at it, click the Clear all caches button on the same page

Exercise: Enable modules

If you haven't already, enable the following modules:

  • Responsive Images (core)

  • Media & Media Library (both on core)

PreviousInclude statementsNextDrupal entities

Last updated 3 years ago

Was this helpful?

(depends on )

& Admin Toolbar Extra Tools

(depends on )

Components Libraries
Paragraphs
Entity Reference Revisions
Devel
Admin toolbar
Twig Field Value
Focal Point
Crop API
Views Reference Field