1

Drupal 8 question: I need to show same content page (say /node/12) using different themes, when used in a menu link. I have 'URLs aliases' created (eg: /ma/testPage, /nj/testPage ) both points to /node/12 (URL aliases module).

I have 'switch page theme' module which points to different themes based on the path (/ma/* points to theme1, /nj/* points to theme2).

When I view the page using /nj/testPage or /ma/testPage, it uses the same theme (theme1). As per the rule in 'Switch page theme' i am expecting the same node render using different theme. It doesn't happen like that. Could anyone help what i am doing wrong? Or is it not possible to render same node using different theme?

1

The Switch Page Theme module not supported "switching by aliases" yet.

See details here Theme switching not working with aliased paths?

  • Thanks for pointing to the question. Do we have any other solution in Drupal to handle this requirement? ie,Use different theme for same content (ie, same node), served using different URL structure? Thanks in advance. – Benny Joseph Dec 27 '17 at 14:31
0

You can use the patch (https://www.drupal.org/project/switch_page_theme/issues/2929541) in Switch Page Theme module to show the same nodes with different themes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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