0

Our site is split down the middle for tenants and landlords. But we have content the is the same for both such as "how to report antisocial behaviour".

User would normally navigate something like "Home > Tenant > ASB" or "Home > Landlord > ASB".

Duplicating content obviously isn't good, but we aren't worried about SEO, we are worried about maintainablity and context for the user.

So, I looking for a way to provide 2 aliases for a piece of content, and have the active trail show accordingly.

I found this, which suggest that symfony should be able to handle it, but I can't find how I would make it work in Drupal.

I can add a second alias, but I always get forwarded to the last one entered.

2
  • 3
    Possible duplicate of More than one path alias per node
    – Kevin
    Jan 10, 2018 at 13:51
  • @Kevin, it's not. It is similar I grant you, but not the same. They have are basically creating duplicates of /node/nid, I'm after actually aliases that can be controlled by the editors. Whilst my most clear use case is the tenant vs landlord, they are no the only ones. Jan 11, 2018 at 10:30

2 Answers 2

0

A simple solution is to create Content Type, say 'delegated', with a single node reference field. Then, configure the reference field to point nodes of the content you want to be duplicated. Configure this field to show the referenced node as full node view (or whatever View mode you prefer).

This way:

  • You can create independent pages with their own title, breadcrumb, alias, metadata, etc, but same content (if they reference the same node).

  • Editors are able to update/create those 'delegated' node easily (they are just a node).

  • As reference field can be limited by a View, you can narrow the contents available to be referenced in a powerful way.

As all are nodes, you can even create admin views to see with contents are related, or any other node available operation.

The main drawback is if you have configurations in referenced nodes that you want to be in the referencer node (say metatags). This could be solved using a custom module (updating referencer metatags when referenced node is updated) or manual copy-paste (ugly).

1
  • That's an interesting solution! I'll have a look at this and see how it works out, but it seems odd the Drupal would prevent me from just adding a second alias… Feb 5, 2018 at 8:26
0

If you are not worried about SEO (as you wrote), you can just create a duplicate of the page.

The other way is to use the Redirect module. With this module, you'll be able to add many redirects to the same page (but they'll direct a user to the main page URL).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.