drupal-7drupal-theming

How Load a Theme For Path


I like Context if Path /gallery Load A New Theme example "Bartik" Other page load "Omega" Theme

I Install the "Context Condition Theme" Modules But it does not working

What's your recommendation?


Solution

  • Use can use ThemeKey module.

    Enable ThemeKey module and its required sub modules, then go to the config page at admin/config/user-interface/themekey. Here you will see may options for switching the theme.

    As you required there is an option path:node_alias so select this option and also set the value as you want like you say /gallery and then select the theme you want to enable at this url.

    For wildcard path use this setting as you required web/*:

    Property: drupal:path
    Operator: =
    Value: %wildcard
    
    Property: drupal:path:wildcard
    Wildcard: wildcard
    Operator: ~
    Value: /^web/.*
    

    Like this image reference:

    wildcards for ThemeKey