Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
uw_fdsu_theme_resp
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_fdsu_theme_resp
Commits
4f5c3027
Commit
4f5c3027
authored
4 years ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-4571-4548: adding correct home link
parent
99cee489
No related branches found
No related tags found
1 merge request
!15
Feature/istwcms 4571 4548 ebremner home link
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/regions/region--header.html.twig
+2
-1
2 additions, 1 deletion
templates/regions/region--header.html.twig
uw_fdsu_theme_resp.theme
+4
-0
4 additions, 0 deletions
uw_fdsu_theme_resp.theme
with
6 additions
and
1 deletion
templates/regions/region--header.html.twig
+
2
−
1
View file @
4f5c3027
...
@@ -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
}
%}
}
%}
This diff is collapsed.
Click to expand it.
uw_fdsu_theme_resp.theme
+
4
−
0
View file @
4f5c3027
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment