1

I'm writing a visibility rule for an element on a Panel page that also has a view with exposed filter. The goal is to show this element only when the filter isn't set. Is there a way to check weather the view on the current page was filtered with exposed filter or not?

1 Answer 1

1

There might be other more convenient solutions but this is a quick one, in some cases it wont work or suit at all (it will work on pages with clean urls), but you can perform current path validation by this code:

$destination = drupal_get_destination();
$destination = $destination['destination'];

// validate if path contains "?" from exposed filter

if (preg_match("/\?/", $destination)) {
return FALSE;
}
else {
return TRUE;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.