
| Current Path : /var/www/html/german-vocational.cn/themes/vartheme/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/german-vocational.cn/themes/vartheme/vartheme.theme |
<?php
/**
* @file
* Varbase Vartheme.
*
* Have custom alteration over the theme layer.
*/
/**
* Implements hook_theme_suggestions_HOOK_alter().
*/
function vartheme_theme_suggestions_page_alter(array &$suggestions, array $variables) {
if ($node = \Drupal::routeMatch()->getParameter('node')) {
if(is_numeric($node)) {
$node = \Drupal\node\Entity\Node::load($node);
}
if($node instanceof \Drupal\node\NodeInterface) {
array_splice($suggestions, 1, 0, 'page__' . $node->bundle());
}
}
}
/**
* Implements hook_preprocess_page().
*/
function vartheme_preprocess_page(&$variables) {
$variables['logo_print'] = \Drupal::request()->getBaseUrl() . '/' . drupal_get_path('theme', 'vartheme') . '/logo-print.png';
}