You are here

function template_preprocess_views_view_views_rss_fields in Views RSS 6.2

Same name and namespace in other branches
  1. 6 views/views_rss_views_fields.theme.inc \template_preprocess_views_view_views_rss_fields()
  2. 7 views/views_rss_views_fields.theme.inc \template_preprocess_views_view_views_rss_fields()

Template preprocessor for views-view-views-rss-fields.tpl.php.

File

theme/theme.inc, line 203
Theme functions for Views RSS module.

Code

function template_preprocess_views_view_views_rss_fields(&$variables) {

  // Theme hook suggestions. Examples assume that:
  // - display plugin = "feed"
  // - current display = "feed_1"
  // - view name = "myfeed"
  $base = 'views-view-views-rss-fields--';

  // views-view-views-rss-fields--feed.tpl.php
  $variables['template_files'][] = $base . $variables['view']->display[$variables['view']->current_display]->display_plugin;

  // views-view-views-rss-fields--feed-1.tpl.php
  $variables['template_files'][] = $base . $variables['view']->current_display;

  // views-view-views-rss-fields--myfeed.tpl.php
  $variables['template_files'][] = $base . $variables['view']->name;

  // views-view-views-rss-fields--myfeed--feed.tpl.php
  $variables['template_files'][] = $base . $variables['view']->name . '--' . $variables['view']->display[$variables['view']->current_display]->display_plugin;

  // views-view-views-rss-fields--myfeed--feed-1.tpl.php
  $variables['template_files'][] = $base . $variables['view']->name . '--' . $variables['view']->current_display;
}