Skip to content

Commit

Permalink
NGSTACK-441: override default eZ full view template
Browse files Browse the repository at this point in the history
  • Loading branch information
pspanja committed Sep 24, 2020
1 parent fd3d18d commit cb7cf8e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bundle/Resources/config/ezplatform_default_settings.yml
Expand Up @@ -14,6 +14,11 @@ parameters:
# By default we don't override URL alias view action, for that reason this is commented out
#ezsettings.default.pagelayout: '@@NetgenEzPlatformSiteApi/pagelayout.html.twig'

# We override the default full view template because of the automatic view fallback, to prevent
# the default one from extending configured page_layout, which is customized for Site API
# See: @EzPublishCore/default/content/full.html.twig
ezplatform.default_view_templates.content.full: '@@NetgenEzPlatformSiteApi/ez_default/content/full.html.twig'

ezsettings.default.ng_fieldtypes.ezrichtext.embed.content:
template: "@@NetgenEzPlatformSiteApi/default/field_type/ezrichtext/embed/content.html.twig"
ezsettings.default.ng_fieldtypes.ezrichtext.embed.content_denied:
Expand Down
8 changes: 8 additions & 0 deletions bundle/Resources/views/ez_default/content/full.html.twig
@@ -0,0 +1,8 @@
{% extends no_layout == true ? view_base_layout : '@EzPublishCore/pagelayout.html.twig' %}
{% block content %}
<h2>{{ ez_content_name(content) }}</h2>
{% for field in content.fieldsByLanguage(language|default(null)) %}
<h3>{{ field.fieldDefIdentifier }}</h3>
{{ ez_render_field(content, field.fieldDefIdentifier) }}
{% endfor %}
{% endblock %}

0 comments on commit cb7cf8e

Please sign in to comment.