Session Description

Theme functions, such as theme_image() and theme_item_list(), have lost the battle to templates. While they can still exist, there are none in Drupal 8 core. They've all been converted to templates - and with good reason.

theme() is also a thing of the past. It's gone - and while render arrays aren't new in Drupal 8, they've now taken full responsibility for rendering everything on a page. This, too, is worth celebrating.

Start using templates and render arrays exclusively today - even in Drupal 7.

This session has your back. It will cover:

  • converting a theme function to a template and preprocess logic
  • how render arrays work and how to use them instead of theme()
  • the advantages of both

Track(s)

Front-end

Drupal-specific

Yes

Drupal beginners

No

Session length

60 minutes