What is this?
Rabbit Hole is a module that adds the ability to control what should happen when an entity is being viewed at its own page.
Perhaps you have a content type that never should be displayed on its own page, like an image content type that's displayed in a carousel. Rabbit Hole can prevent this node from being accessible on its own page, through node/xxx.
This works by providing multiple options to control what should happen when the entity is being viewed at its own page. You have the ability to
- Deliver an access denied page.
- Deliver a page not found page.
- Issue a page redirect to any path or external url.
- Or simply display the entity (regular behavior).
This is configurable per bundle and per entity. There is also a permission that lets certain roles override Rabbit Hole completely.
It's possible to evaluate PHP for the redirect path. This makes it possible to execute different redirects based on whatever logics you need. Perhaps you wan't a user to be able to view nodes that he has created, but no one else's. The PHP evaluation is limited to users with the appropriate permission, so there's no unnecessary security breach.
This project includes sub modules that are responsible to add this behavior to different entities. The currently supported entities are:
- Taxonomy terms
You'll only need to enable the modules that you wish to add the functionality for. More entities are likely to be supported in the future. If you have a suggestion, submit a feature request using the issue queue.
There are support for tokens when you are using the redirect option. However, it's recommended to install the Token module, which will provide you with a table of the available tokens.
Module development is sponsored by Odd Hill