Drupal 8 Theming

Week 2

Anatomie van een theme

Summary

  • Intro
  • Wat gaan we zien?
  • Anatomie van een theme
  • Praktijk

 

Wat is een theme

D8 "definition"

A theme is a collection of files that define the presentation layer. You can also create one or more "sub-themes" or variations on a theme.

 

https://www.drupal.org/docs/8/theming

Thema

Html, CSS, JS

PHP

MySQL

API's

Inheritance

Sub-themes are just like any other theme, with one difference: They inherit the parent theme's resources. There are no limits on the chaining capabilities connecting sub-themes for their parents. A sub-theme can be a child of another sub-theme, and it can be branched and organized however you see fit. This is what gives sub-themes great potential.

Common uses

Waarom een theme gebruiken?

Multisites

  • One codebase
  • Two themes

Landingpages

Seasonal

Soorten themes

 

Ready made

Starterthemes

  • Themes zoals:

    • https://www.drupal.org/project/bootstrap

    • https://www.drupal.org/project/zurb_foundation

    • https://www.drupal.org/project/neato

  • Goede integratie

    • Componenten van frameworks werken Out of the box

    • Meestal inclusief startertheme

  • Veel custom werk

Corethemes

/core/themes

  • bartik (default)
  • classy
  • seven (admin)
  • stable
  • stark

Onze focus

=

Custom theme

 

Tips

Disable cache & aggregation

admin/config/development/performance

Je ziet je wijziging niet?

Clear cache!

$ drush cr

Andere errors debuggen?

1. Drupal error log

/admin/reports/dblog

 

 

Andere errors debuggen?

2. Apache error log

In Acquia Dev Desktop

Click on Acquia Dev Desktop

=> Preferences => Logs => View Apache Errors

Exercises

Requirements

Requirements

  1. Host your site locally using Acquia Dev Desktop 
  2. Install a Drupal site with the Demo profile Umami

Goal

Recreate a theme

similar to the Umami theme

Drupal 8 Theming IMD W2

By Pieter Mathys

Drupal 8 Theming IMD W2

Les week 2 D8 IMD Theming

  • 429