My main HTML layout looks like that :
!DOCTYPE html
html
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
title{% block title 'Default title - example.com' %}/title
I want to have only to write this in my controller layout :
{% block title %}My title{%
On Fri, 11 Feb 2011 13:53:00 +0100, Christophe Beyer cbe...@cap-tic.fr
wrote:
My main HTML layout looks like that :
!DOCTYPE html
html
head
meta http-equiv=Content-Type content=text/html;
charset=utf-8
/
title{% block title 'Default title - example.com'
This works great :
{% block title %}My title - {{ parent() }}{% endblock %}
Nothing about this tip in the documentation, I could'nt know this.
Thanks !
--
Christophe
Le 11 févr. 2011 à 14:00, stof a écrit :
On Fri, 11 Feb 2011 13:53:00 +0100, Christophe Beyer cbe...@cap-tic.fr
wrote:
On Fri, 11 Feb 2011 14:25:00 +0100, Christophe Beyer cbe...@cap-tic.fr
wrote:
This works great :
{% block title %}My title - {{ parent() }}{% endblock %}
Nothing about this tip in the documentation, I could'nt know this.
Thanks !
The Twig documentation clearly says that the parent