I'm delving into the world of EZ Platform trying to render a pagelayout
with their respective content types.
The problem I have is the inheritance of the contents to render. I explain. In my project I have a% main% co that loads all the CSS, JS, a block with the menu and a header and finally the footer.
<!-- BLOQUE DE CSS -->
{% stylesheets 'assets/css/*' 'assets/css/style.css' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
{% block header %} {% endblock %}
{% block content %} {% endblock %}
{% block footer %} {% endblock %}
<!-- BLOQUE JS -->
{% javascripts 'assets/js/*' %}
<script src="{{ asset_url }}"></script>
{% endblock %}
I have created a content type that contains an email and a general description and the idea is to render that content type in a twig that inherits from pagelayout
, within pagelayout
home:
template: "themes/club/full/home/home.html.twig"
match:
Id\Location: 2
full_top:
template: "themes/club/parts/page_layout_header.html.twig"
match:
Identifier\ContentType: 'informacion_general'
Within {% block header %}
I render the contents of page_layout_header.html.twig
with identifier content type
, staying more or less like this:
{% extends ':themes/club:pagelayout.html.twig' %}
{% block header %}
<!--Header area start here-->
<header>
<div class="header-top-area">
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<div class="header-top-left">
<ul>
<li><a href="mailto:#"><i class="fa fa-envelope-o" aria-hidden="true"></i> {{ ez_render_field( content, 'web_config_email_contacto' ) }}</a></li>
<li><img src="{{ asset('assets/images/logo/flag.jpg') }}" alt="Logo">
......
......
Well, something escapes me because when I launch informacion_general
to see the progress of the home, the twig that contains the top of the page is not displayed. Something is beyond my understanding.