Skip to content

Commit

Permalink
NGSTACK-416: set layout to true for full view fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
pspanja committed Sep 9, 2020
1 parent 90bd5b8 commit 14fa6bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
{# content \Netgen\EzPlatformSiteApi\API\Values\Content #}
{# location \Netgen\EzPlatformSiteApi\API\Values\Location #}

{% set viewType = app.request.attributes.get('viewType') %}
{% set layout = (viewType == 'full') %}

{% if ezpublish.configResolver.getParameter('ng_fallback_without_subrequest') == true %}
{{ ng_ez_view_content(location.innerLocation|default(content.innerContent), app.request.attributes.get('viewType')) }}
{{ ng_ez_view_content(location.innerLocation|default(content.innerContent), viewType, [], layout) }}
{% else %}
{{ render(
controller(
'ez_content:viewAction', {
'content': content.innerContent,
'location': location.innerLocation,
'viewType': app.request.attributes.get('viewType')
'viewType': viewType,
'layout': layout
}
)
) }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
{# content \Netgen\EzPlatformSiteApi\API\Values\Content #}
{# location \Netgen\EzPlatformSiteApi\API\Values\Location #}

{% set viewType = app.request.attributes.get('viewType') %}
{% set layout = (viewType == 'full') %}

{% if ezpublish.configResolver.getParameter('ng_fallback_without_subrequest') == true %}
{{ ng_view_content(location|default(content), app.request.attributes.get('viewType')) }}
{{ ng_view_content(location|default(content), viewType, [], layout) }}
{% else %}
{{ render(
controller(
'ng_content:viewAction', {
'contentId': content.id,
'locationId': location.id,
'viewType': app.request.attributes.get('viewType')
'viewType': viewType,
'layout': layout
}
)
) }}
Expand Down

0 comments on commit 14fa6bc

Please sign in to comment.