Override Octavia views template for pages
This commit is contained in:
parent
97e4e6f56b
commit
9eeb560de4
1 changed files with 19 additions and 0 deletions
19
agaric/templates/views/views-view--page.html.twig
Normal file
19
agaric/templates/views/views-view--page.html.twig
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{% extends "@stable/views/views-view.html.twig" %}
|
||||||
|
{% set style = view.getStyle().getPluginId() %}
|
||||||
|
{% set default_row_class = view.style_plugin.options.default_row_class %}
|
||||||
|
{% set has_view_mode = view.rowPlugin.options['view_mode'] is defined or view.rowPlugin.options['view_modes'] is defined %}
|
||||||
|
{#
|
||||||
|
Only apply to unformatted (default) displays without a row class and with a
|
||||||
|
selected view mode.
|
||||||
|
#}
|
||||||
|
{% if (style == 'default') and (not default_row_class) and has_view_mode %}
|
||||||
|
{# Add columns classes to the wrapper. #}
|
||||||
|
{%
|
||||||
|
set classes = [
|
||||||
|
'columns',
|
||||||
|
'is-multiline',
|
||||||
|
'is-centered'
|
||||||
|
]
|
||||||
|
%}
|
||||||
|
{% set attributes = attributes.addClass(classes) %}
|
||||||
|
{% endif %}
|
Loading…
Reference in a new issue