I’m creating a “Testimonials” block with a new content type and Views module. The problem is that Drupal creates a separate page for each testimonial and users could access the page should they know its ID (or find the page in SERP).
Is it possible to disable node pages for that specific content type, but list the nodes in a Views block? The standard “404” Drupal page would be ideal.
Thanks!
Tricky one because you’re not going to be able to use hook_node_access() (the view mode is never passed through so you can’t determine between teaser and full pages). A quick dirty way to do it would be in hook_node_view():
There are probably better mode ‘Drupal’ ways to do it but that will do in a pinch.