| Conditions | 7 |
| Paths | 32 |
| Total Lines | 37 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | function one_preprocess_page(&$variables) { |
||
| 8 | // Add the class container if layout builder is not used. |
||
| 9 | if (!\Drupal::routeMatch()->getParameter('node') && |
||
| 10 | !\Drupal::routeMatch()->getRouteObject()->hasOption('_layout_builder')) { |
||
| 11 | $variables['container_class'] = 'container'; |
||
| 12 | } |
||
| 13 | |||
| 14 | // Set container for Meta Header |
||
| 15 | if (theme_get_setting('meta_header_full_width')) { |
||
| 16 | $variables['meta_header_width'] = 'container-fluid'; |
||
| 17 | } |
||
| 18 | else { |
||
| 19 | $variables['meta_header_width'] = 'container'; |
||
| 20 | } |
||
| 21 | |||
| 22 | // Set container for Navbar |
||
| 23 | if (theme_get_setting('navbar_full_width')) { |
||
| 24 | $variables['navbar_width'] = 'container-fluid'; |
||
| 25 | } |
||
| 26 | else { |
||
| 27 | $variables['navbar_width'] = 'container'; |
||
| 28 | } |
||
| 29 | |||
| 30 | // Set container for Header |
||
| 31 | if (theme_get_setting('header_full_width')) { |
||
| 32 | $variables['header_width'] = 'container-fluid'; |
||
| 33 | } |
||
| 34 | else { |
||
| 35 | $variables['header_width'] = 'container'; |
||
| 36 | } |
||
| 37 | |||
| 38 | // Set container for Footer |
||
| 39 | if (theme_get_setting('footer_full_width')) { |
||
| 40 | $variables['footer_width'] = 'container-fluid'; |
||
| 41 | } |
||
| 42 | else { |
||
| 43 | $variables['footer_width'] = 'container'; |
||
| 44 | } |
||
| 46 |