1

I'm trying to create an img link manually with php in the header field of a view, in drupal 6. I need to read the value of one of the filters, but can't find the right variable to read. I thought I could print_r($view->filters) but it didn't give me anything, and I eventually found out that isset($view) is false.

Am I looking the wrong way?

The context I'm writing in is the header field of the view, with php code as input format. Do I have to "enable" the $view variable for reading in this context somehow?

4

1 回答 1

2

好的,我找到了,这真的很容易:

$pa_view = views_get_current_view();
$pa_nr = $pa_view->display['default']->display_options['filters']['field_nummer_value']['value']['value'];
于 2009-07-11T09:45:56.267 回答