Hi! – Drupal 8 – Theming with Twig



Hi! – Drupal 8 – Theming with Twig

0 0


d8trainville_presentation


On Github dasjo / d8trainville_presentation

Hi!

Welcome
fago & dasjo

Agenda

Drupal 8 overview Setup & introduce our  use case The new editing experience Views in Core Image handling Taking advantage of Entity & Field API improvements Blocks & layouts Theming with Twig CMI - config in files Multilingual

Drupal 8

It's not ready!

UI/UX Improvements

Drupal 8 continues the trend of updating the user interface and improving overall user experience.
  • It's easier to use.
  • It's easier to find things.
  • It's more accessible.

HTML 5 & Mobile

  • All core themes use HTML5.
  • Markup has been improved throughout core.
  • New HTML5 elements: phone, email, url, number, and date.
  • Next generation enhancements with Modernizr.js
  • Dropped support for IE 6 & 7.
  • Responsive / Mobile friendly
  • Accessibility improvements

Initiatives

  • Official
    • Configuration Management (CMI)
    • Web Services (WSCCI)
    • Blocks & Layouts
    • Mobile
    • Multilingual
  • And many more
    • Views in Core
    • Entity NG
    • Twig, JavaScript clean-up,  Design, HTML 5
    • Spark

Administration & editing experience

  • Improved installer
  • Improved edit form
  • HTML 5 form elements
  • WYSIWYG in core
  • In-Place editing
  • Tiny helpers: 
    • Module filter
    • Tour module

Views in Core

  • Easily build lists of content anywhere.
  • Edit existing lists (admin_views):
    • Front page.
    • Content administration.
  • Bulk operations in core (VB)

Image handling & responsiveness

  • Imagecache in core
  • Responsive images
    • Picture module
    • Breakpoints module

Taking advantage of Entity & Field API improvements

Theming with Twig

Drupal 7 Theming pain points

  • Syntax
  • Inconsistency
  • Complexity
  • Redundancy
  • Security

Changes

  • New template engine
  • New theme hooks
  • Everything renderable
  • Markup Utility Functions
  • Theme component library

Twig wins

  • consistency
  • auto sanitization
  • beautiful templates
  • safe templates (contemplate)
  • portable to front-end: TwigJshttps://github.com/schmittjoh/twig.js

Blocks & layouts

Scotch, not Whiskey!

  • Drupal 7
    • Panels, Context, Display suite, Beans, ...
  • Plans
    • Isolated block rendering
    • Contexts/data sources
    • Condition plugins
    • Displays & layouts

Title