Rabbit hole href link alter

Extension to the wonderful rabbit_hole module, modifying all links to the canonical rabbit_hole'd entity accordingly to the rabbit_hole settings instead of redirect.

Or simplified...

If a link targets an entity canonical (for example from a view) and that entity has rabbit_hole's "page redirection" setting enabled, the link now targets the redirection url directly instead of the canonical url which would cause a redirect then in rabbit_hole.
The behaviour for accessing a rabbit_hole'd canonical url directly remains unchanged.

This module is still work in progress, please help to fix issues and don't use this in production yet. Currently, the module only works for taxonomy terms and has several issues to be solved.

Implemented link behaviours:

Page redirection:

This is the main purpose of this module! Rewrites the canonical link href directly to the redirect target instead of the entity to save one redirect and for better SEO!

Access denied (403):

No implementation yet. Eventually remove the link entirely? Discuss use-cases in this issue: #3095702: How to handle other behaviour types (404, 403)

Page not found (404):

No implementation yet. Eventually remove the link entirely? Discuss use-cases in this issue: #3095702: How to handle other behaviour types (404, 403)

Show page:

No change required.

Typical use-case:

  • You're using entities (e.g. Taxonomy terms) as filters on other entities in a view. Instead of displaying the taxonomy term page, simply link to the view and set the term id or name as exposed filter or views argument.
  • Redirect to a different page or entity instead of the entity itself which represents this entity.
  • What's your use-case? Please describe it here ([#TODO]) to add it as manual in the README.txt!

The link altering mechanism can be individually enabled / disabled like all other rabbit_hole settings.

Required modules:

Alternative / similar modules:

Supporting this module

Support DROWL's ♥ FOSS work on this module on OpenCollective!

Drupal and this module are FOSS. However, it takes dedicated people to develop and maintain. And they need YOU to give back!

We're committed to building and maintaining Drupal modules that benefit the entire community.

Supporting us on OpenCollective helps us continue to improve, innovate and contribute to Drupal's future. Every pledge makes a difference!

If this module has helped you, we would be very grateful for your donation to support its further development and maintenance.

Support our FOSS development ♥️

You can also speed up the development of features or bugfixes you'd love to see, by sponsoring and giving back!

Sponsor a feature or bugfix 🚀

Let's make Drupal even better, together!


Development proudly sponsored by German Drupal Friends & Companies:

webks: websolutions kept simple (https://www.webks.de)
and
DROWL: Drupalbasierte Lösungen aus Ostwestfalen-Lippe (OWL), Germany (https://www.drowl.de)

Supporting organizations: 
proudly developed this module for the community!

Project information

Releases