triển khai drupal để làm FE

This commit is contained in:
NAS\NASPC
2026-05-27 09:01:38 +07:00
parent 6bdc2aa18f
commit 8b06a94852
242 changed files with 35975 additions and 21294 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
/**
* @file
* Functions to support theming in the S.I.S Can Tho theme.
*/
/**
* Implements hook_preprocess_HOOK() for page templates.
*/
function sis_theme_preprocess_page(&$variables) {
// Pass dynamic front page URL
$variables['front_page'] = \Drupal::urlGenerator()->generateFromRoute('<front>');
// Try to determine if the current page is the front page
try {
$variables['is_front'] = \Drupal::service('path.matcher')->isFrontPage();
}
catch (\Exception $e) {
$variables['is_front'] = FALSE;
}
}