Skip to main content
improved formatting
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

TryUse hook_views_pre_render()hook_views_pre_render().


/**

  • Implements hook_views_pre_render(). */ function cv_views_pre_render(&$view) { // dpm($view); // dpm view here to see its properties. // and replace $view->name and $view->current_display with actual values from your view. // Note that my example uses Global: Text area for header, that's why I use $view->header['area']. // Other options available for header have different names. Try to find one that you use. if ($view->name == 'homepage' && $view->current_display = 'homepage_page_display') { $view->header['area']->options['content'] = t('TEST message'); } }

/**
 * Implements hook_views_pre_render().
 */
function cv_views_pre_render(&$view) {
  // dpm($view); // dpm view here to see its properties.
  // and replace $view->name and $view->current_display with actual values from your view.
  // Note that my example uses Global: Text area for header, that's why I use $view->header['area']. 
  // Other options available for header have different names. Try to find one that you use.
  if ($view->name == 'homepage' && $view->current_display = 'homepage_page_display') {
    $view->header['area']->options['content'] = t('TEST message');
  }
}

Try hook_views_pre_render().


/**

  • Implements hook_views_pre_render(). */ function cv_views_pre_render(&$view) { // dpm($view); // dpm view here to see its properties. // and replace $view->name and $view->current_display with actual values from your view. // Note that my example uses Global: Text area for header, that's why I use $view->header['area']. // Other options available for header have different names. Try to find one that you use. if ($view->name == 'homepage' && $view->current_display = 'homepage_page_display') { $view->header['area']->options['content'] = t('TEST message'); } }

Use hook_views_pre_render().

/**
 * Implements hook_views_pre_render().
 */
function cv_views_pre_render(&$view) {
  // dpm($view); // dpm view here to see its properties.
  // and replace $view->name and $view->current_display with actual values from your view.
  // Note that my example uses Global: Text area for header, that's why I use $view->header['area']. 
  // Other options available for header have different names. Try to find one that you use.
  if ($view->name == 'homepage' && $view->current_display = 'homepage_page_display') {
    $view->header['area']->options['content'] = t('TEST message');
  }
}
Source Link

Try hook_views_pre_render().

/**

  • Implements hook_views_pre_render(). */ function cv_views_pre_render(&$view) { // dpm($view); // dpm view here to see its properties. // and replace $view->name and $view->current_display with actual values from your view. // Note that my example uses Global: Text area for header, that's why I use $view->header['area']. // Other options available for header have different names. Try to find one that you use. if ($view->name == 'homepage' && $view->current_display = 'homepage_page_display') { $view->header['area']->options['content'] = t('TEST message'); } }