j4wx/theme_picker

Advanced theme selection/negotiation for Drupal 8

Installs: 46

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:drupal-module

1.0.0-alpha2 2018-10-24 17:52 UTC

This package is auto-updated.

Last update: 2024-04-25 21:17:08 UTC


README

Using Fields for Theme Selection in Drupal 8

This module performs theme negotiation using fields. A content type can have it's theme set in one of three ways (ordered by descending priority):

  • Through a "Theme" field, with the machine name "field_theme_selection".
  • Through an entity reference field, with the machine name "field_parent_theme".
  • Through an entity reference field, with the machine name "field_parent".

If either of the entity reference fields are chosen, the referred entity can have it's theme set using either of those methods. This means the following is possible:

Category Page (With field_theme_selection), Subcategory page (with field_parent or field_parent_theme), Content page (with field_parent or field_parent_theme).

Changing the category page's field_theme_selection would change update itself, the subcategory page and the content page. This can be theoretically looped infinitely, but each of the nodes traversed is accessed independently so this could be a costly process with several traversed nodes.

Plans

  • Initial Version
  • Use paned settings (like drupal/metatags)