Skip to content

Update Twig templates overview for Contao 5.7 (DE+EN)#1729

Merged
netzarbeiter merged 3 commits intocontao:mainfrom
contaoacademy:twig-templates-contao57
Feb 26, 2026
Merged

Update Twig templates overview for Contao 5.7 (DE+EN)#1729
netzarbeiter merged 3 commits intocontao:mainfrom
contaoacademy:twig-templates-contao57

Conversation

@contaoacademy
Copy link
Contributor

As of Contao 5.7, every .html5 template has a Twig equivalent and Twig is now the default standard. The section "Twig templates in Contao core" was updated to reflect this:

  • Updated the opening paragraph to state that as of 5.7, every .html5 template has a Twig equivalent and Twig is now the new standard
  • Added explanation of the template resolution logic: Twig is used by default; a .html5 file in the templates folder takes precedence
  • Added a concrete example (news_full.html.twig / news_full.html5)
  • Made the transition period paragraph more specific, referencing legacy ce_*.html5 elements
  • Strengthened the warning to explicitly recommend against HTML5 templates and legacy ce_* content elements
  • Removed the outdated paragraph stating that not every element has a Twig template yet
  • Minor fix: .html.twig file extension (dot was missing)

As of Contao 5.7, every .html5 template has a Twig equivalent and Twig
is now the default standard. The section was updated to reflect this,
explain the template resolution logic, and strengthen the recommendation
to migrate away from HTML5 and legacy ce_* templates.
Copy link
Member

@netzarbeiter netzarbeiter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Christian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants