Skip to content
Snippets Groups Projects
Commit 4f5c3027 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4571-4548: adding correct home link

parent 99cee489
No related branches found
No related tags found
1 merge request!15Feature/istwcms 4571 4548 ebremner home link
...@@ -17,5 +17,6 @@ ...@@ -17,5 +17,6 @@
'faculty': faculty, 'faculty': faculty,
'classes': classes, 'classes': classes,
'nav_items': main_menu, 'nav_items': main_menu,
'secondary_items': secondary_menu 'secondary_items': secondary_menu,
'home_link': home_link
}%} }%}
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* Theme file for uw_fdsu_theme_resp. * Theme file for uw_fdsu_theme_resp.
*/ */
use Drupal\Core\Url;
use Drupal\file\Plugin\Field\FieldType\FileFieldItemList; use Drupal\file\Plugin\Field\FieldType\FileFieldItemList;
use Drupal\image\Plugin\Field\FieldType\ImageItem; use Drupal\image\Plugin\Field\FieldType\ImageItem;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
...@@ -66,6 +67,9 @@ function uw_fdsu_theme_resp_preprocess_region(&$variables) { ...@@ -66,6 +67,9 @@ function uw_fdsu_theme_resp_preprocess_region(&$variables) {
// (i.e. faculty colour and get the correct class here). // (i.e. faculty colour and get the correct class here).
if ($region == "header") { if ($region == "header") {
// Get the home page link.
$variables['home_link'] = Url::fromRoute('<front>')->setAbsolute()->toString();
// Set the main menu variable. // Set the main menu variable.
$variables['main_menu'] = \Drupal::service('uw_cfg_common.uw_service')->uwGetMenu('main', TRUE, TRUE); $variables['main_menu'] = \Drupal::service('uw_cfg_common.uw_service')->uwGetMenu('main', TRUE, TRUE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment