By cschall on
I need to display a nav block based on category OR a node id. I've got the category part working, but when I view the content for this node (http://www.example.com/?q=node/1), the block is not displayed. Any ideas on what I'm missing?
<?php
$match = FALSE;
if (arg(0) == 'node' && is_numeric(arg(1))) {
$nid = arg(1);
$type = db_result(db_query("SELECT type FROM {node} WHERE nid=$nid"));
if ($type == 'flexinode-1') {
$match = TRUE;
}
}
elseif(nid == 1) {
$match = TRUE;
}
else {
$match = FALSE;
}
return $match;
?>
Comments
Else if
Because it was in your elseif clause
--
The Manual | Troubleshooting FAQ | Tips for posting | Make Backups! | Consider creating a Test site.
still learning php
Thanks for your help! :)