Wednesday, November 30, 2011

Drupal hide the blocks by using the url

How to hide the the drupal blocks?

<?php
//hide the blocks by using the url
$match = TRUE;
$url = request_uri();
if (strpos($url, "admin")) {
$match = FALSE;
}
if (strpos($url, "filter/tips")) {
$match = FALSE;
}
if (strpos($url, "node/add")) {
$match = FALSE;
}
if (strpos($url, "edit")) {
$match = FALSE;
}
if (strpos($url, "node/10")) {
$match = FALSE;
}
return $match;
?>

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.