Skip to content

Commit

Permalink
Use view type from app.request
Browse files Browse the repository at this point in the history
  • Loading branch information
pspanja committed Jan 27, 2020
1 parent 4a2cd3a commit 86f3f73
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{# location \Netgen\EzPlatformSiteApi\API\Values\Location #}

{% if ezpublish.configResolver.getParameter('ng_fallback_without_subrequest') == true %}
{{ ng_ez_view_content_embedded(view_type, { "content": content.innerContent, "location": location.innerLocation }) }}
{{ ng_ez_view_content_embedded(app.request.attributes.get('viewType'), { "content": content.innerContent, "location": location.innerLocation }) }}
{% else %}
{{ render(
controller(
'ez_content:embedAction', {
'content': content.innerContent,
'location': location.innerLocation,
'viewType': view_type
'viewType': app.request.attributes.get('viewType')
}
)
) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{# location \Netgen\EzPlatformSiteApi\API\Values\Location #}

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

{% if ezpublish.configResolver.getParameter('ng_fallback_without_subrequest') == true %}
{{ ng_view_content_embedded(view_type, { "content": content, "location": location }) }}
{{ ng_view_content_embedded(app.request.attributes.get('viewType'), { "content": content, "location": location }) }}
{% else %}
{{ render(
controller(
'ng_content:embedAction', {
'contentId': content.id,
'locationId': location.id,
'viewType': view_type
'viewType': app.request.attributes.get('viewType')
}
)
) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{# location \Netgen\EzPlatformSiteApi\API\Values\Location #}

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

0 comments on commit 86f3f73

Please sign in to comment.