views2 php snippet for header
wrb123 - November 15, 2008 - 19:55
does anyone know why this code would only output "Arguments: " and nothing else? I'm using it in Views2 Header, PHP Input Format, along with the Glossary view included in Views:
<?php
print "Arguments - ";
global $current_view;
print $current_view->args[0];
?>
It's never too late to post
It's never too late to post the answer ;)
If you are using views 2 try this:
<?php$view = views_get_current_view();
$args = $view->args;
?>