You are here

uikit-view-grid.tpl.php in UIkit Components 7.2

Same filename and directory in other branches
  1. 7.3 uikit_views/templates/uikit-view-grid.tpl.php

Template to display a view as a UIkit Grid component.

  • $title: The title of this group of rows. May be empty.
  • $rows: An array of row items.
  • $attributes: The attributes to apply to the list wrapper.
  • $grid_classes: The classes to apply to the list element.

File

uikit_views/templates/uikit-view-grid.tpl.php
View source
<?php

/**
 * @file
 * Template to display a view as a UIkit Grid component.
 *
 * - $title: The title of this group of rows.  May be empty.
 * - $rows: An array of row items.
 * - $attributes: The attributes to apply to the list wrapper.
 * - $grid_classes: The classes to apply to the list element.
 *
 * @see template_preprocess_uikit_view_grid()
 * @see template_process_uikit_view_grid()
 *
 * @ingroup uikit_views_templates
 */
if (!empty($title)) {
  ?>
  <h3><?php

  print $title;
  ?></h3>
<?php

}
?>
<div<?php

print $attributes;
?>>
  <ul class="<?php

print $grid_classes;
?>">
    <?php

foreach ($rows as $item) {
  ?>
      <li><?php

  print $item;
  ?></li>
    <?php

}
?>
  </ul>
</div>