Initial commit
This commit is contained in:
39
assets/theme-template/THEMENAME.theme
Normal file
39
assets/theme-template/THEMENAME.theme
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Functions to support theming in the THEMELABEL theme.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for page templates.
|
||||
*/
|
||||
function THEMENAME_preprocess_page(&$variables) {
|
||||
// Add custom variables or modify existing ones.
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for node templates.
|
||||
*/
|
||||
function THEMENAME_preprocess_node(&$variables) {
|
||||
/** @var \Drupal\node\NodeInterface $node */
|
||||
$node = $variables['node'];
|
||||
|
||||
// Add custom variables based on node.
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_theme_suggestions_HOOK_alter() for page templates.
|
||||
*/
|
||||
function THEMENAME_theme_suggestions_page_alter(array &$suggestions, array $variables) {
|
||||
// Add custom template suggestions.
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_alter().
|
||||
*/
|
||||
function THEMENAME_form_alter(&$form, FormStateInterface $form_state, $form_id) {
|
||||
// Modify forms as needed.
|
||||
}
|
||||
Reference in New Issue
Block a user