Skip to content

Instantly share code, notes, and snippets.

@tanmayk
Created May 13, 2016 14:24
Show Gist options
  • Save tanmayk/925df7b37cbc037fa5c0946ffe083510 to your computer and use it in GitHub Desktop.
Save tanmayk/925df7b37cbc037fa5c0946ffe083510 to your computer and use it in GitHub Desktop.
<?php
/**
* @file
* Theme for My Scroller views.
*/
/**
* Prepares variables for views scroller templates.
*
* Default template: views-view-scroller.html.twig.
*
* @param array $variables
* An associative array containing:
* - view: A ViewExecutable object.
* - rows: The raw row data.
*/
function template_preprocess_views_view_scroller(&$variables) {
// View options set by user.
$options = $variables['view']->style_plugin->options;
$rows = $variables['rows'];
// Apply required logic and add variables here. We can define variable in
// our hook_theme and use it here.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment