-
-
Save asanchez75/540dc4fa61560ee18990268cff1f8ff4 to your computer and use it in GitHub Desktop.
Add custom php header to a drupal 7 view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MYMODULE_views_pre_view(&$view, &$display_id, &$args){ | |
if ($view->name == 'VIEWNAME' && $display_id == 'DISPLAYNAME'){ | |
$header = 'MYCODE'; | |
$options = array( | |
'empty' => 1, | |
'content' => $header, | |
'label' => NULL, | |
); | |
$view->add_item('DISPLAYNAME', 'header', 'views','area_text_custom', $options); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment