Clean Twig & Minimal Preprocess

Session Category Desarrollo Room Salón 2 Audience Intermedio Time Slot Vie 2:00pm to 2:45pm (2/27/26)

In many Drupal projects, theming becomes “preprocess everywhere”: very long functions, repeated logic, and Twig templates full of "if" statements. This makes the theme hard to maintain and hard to review.

In this 30-minute talk, I will show simple rules to decide: what goes in Twig, what goes in preprocess, and when to use render arrays. We will look at common mistakes (printing entities in Twig, adding “active” classes from the URL, attaching libraries only when needed) and quick before/after refactors you can apply in Drupal 10.

About the Speaker

Profile picture for user j.roblero

ParallelDevs

Soy Jessy Roblero, desarrollador web apasionado por Drupal y el front-end. Me gusta construir componentes reutilizables. Suelo trabajar con Twig, SCSS y JavaScript, buscando buen performance y una UI consistente.