I am using Drupal 7.
For example, I do not want to show node uid=28 in the list ($page==0). The list page is a "view" without filtering there. So it shows up all the nodes of a specific content type (I only filter with this content type in view setting).
With this function, I can change its title.
function mymodule_node_view($node, $view_mode, $langcode) {
if ($node->uid == 28) {
$node->title = "Do not show me!!!";
$node = NULL;
unset($node);
}
}
But I could not work out how to not show up this node at all in the list. I do not want to implement some filtering in view part.
This does not work.
$node = NULL;
unset($node);
I like to use hook_node_view and set more complicated filter logic there.
So basically I like to: implement a view page with only filtering to specific content type that I want; implement a more complicated filtering/selecting method in hook_node_view.