Rules

Use rules to load different themes on the frontend according to 4 different parameters :

  • the current site
  • the current language
  • the current view port
  • the current url path, this can also be a regular expression if enclosed in slashes. example /^blog*/. Enter / for the homepage.

The first rule that match will define which theme will be used. Organise your rules to have the most specific first.

If no rules match, the default theme will be used.

If no default is set, the theme engine will just not be used and your templates will be loaded from the root templates folder.

Console/CP requests

If you have templates requested during a CP or Console request for the site mode (View::TEMPLATE_MODE_SITE), you must set the Console/CP themes in the rules section if you want your theme to takeover those templates. A good example for that would be emails sent when using the backend or during a queue.

On Craft pro you can specify the setting "HTML Email Template", this template won't be found in your theme unless the CP requests theme has been set in your rules.

You must enable javascript to view this website