Rui Martins
Rui Martins

Reputation: 51

Change drupal theme based on panels layout

I'm using panels and ctools page manager on Drupal 7 in order to create landing pages. I want to force the use of a specific theme for pages defined with a certain panels layout.

I can use hook_ctools_render_alter to get layout name - $context['handler']->conf['temp_layout']. But I can't figure out how to change the theme in this hook. You can use hook_custom_theme to change theme but there you haven't $context object.

Upvotes: 0

Views: 124

Answers (1)

Quint
Quint

Reputation: 776

Have you looked at the ThemeKey module? It doesn't work by panel, but by path. Since your panel pages should have paths, it may be a good solution for you.

Upvotes: 0

Related Questions