I have a block I want to show in specific content types and some URLs.
I tried adding the following code.
$match = FALSE;
// block is visible on the content types entered here
$types = array('story' => 1, 'page' => 1);
$url = request_uri();
if ((arg(0) == 'node') && is_numeric(arg(1))) {
$node = node_load(arg(1));
$match = isset($types[$node->type]);
}
// block is invisible on URLs entered here
if (strpos($url, "edit")) {
$match = TRUE;
}
// copy paste these for additional URLs
if (strpos($url, "taxonomy/term/8")) {
$match = TRUE;
}
return $match;
Is it possible to use wildcard or something to include all the child in this taxonomy, instead of using taxonomy/term/8?