X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fviews_responsive_grid%2Ftemplates%2Fviews-view-responsive-grid.html.twig;fp=web%2Fmodules%2Fcontrib%2Fviews_responsive_grid%2Ftemplates%2Fviews-view-responsive-grid.html.twig;h=619879bfa1adadc28003b3e34ad669fe649018d4;hp=0000000000000000000000000000000000000000;hb=8acec36f19c470dfcda1ae2336826a782f41874c;hpb=e0411c4e83ba0d079034db83c3f7f55be24a0e35 diff --git a/web/modules/contrib/views_responsive_grid/templates/views-view-responsive-grid.html.twig b/web/modules/contrib/views_responsive_grid/templates/views-view-responsive-grid.html.twig new file mode 100644 index 000000000..619879bfa --- /dev/null +++ b/web/modules/contrib/views_responsive_grid/templates/views-view-responsive-grid.html.twig @@ -0,0 +1,50 @@ +{# +/** + * @file + * Default theme implementation for views to display rows in a responsive grid. + * + * Available variables: + * - attributes: HTML attributes for the wrapping div element. + * - title: The title of this group of rows. + * - view: The view object. + * - rows: The rendered view results array. + * - options: The view plugin style options. + * - items: Contains a nested array of grid items. The structure of this array + * - depends on the value of options.alignment. + * - row_attributes: HTML attributes for each grid row. The structure of this + * array depends on the value of options.alignment. + * - col_attributes: HTML attributes for each grid column. The structure of this + * array depends on the value of options.alignment. + * + * @see template_process_views_view_responsive_grid() + * + * @ingroup themeable + * @ingroup views_templates + */ +#} +{% if title %} +

{{ title }}

+{% endif %} + +{% if options.alignment == 'horizontal' %} + {% for row_key, row in items %} + + {% for col_key, col in row %} + + {{ items[row_key][col_key] }} + + {% endfor %} + + {% endfor %} +{% else %} + {% for col_key, column in items %} + + {% for row_key, row in column %} + + {{ items[col_key][row_key] }} + + {% endfor %} + + {% endfor %} +{% endif %} +