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
7541074a
Commit
7541074a
authored
3 years ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5234: updating theme to use new hero at top of page
parent
a9bb3ff3
No related branches found
No related tags found
1 merge request
!61
Feature/istwcms 5234 ebremner hero
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/blocks/block--page-title-block.html.twig
+1
-1
1 addition, 1 deletion
templates/blocks/block--page-title-block.html.twig
uw_fdsu_theme_resp.theme
+6
-6
6 additions, 6 deletions
uw_fdsu_theme_resp.theme
with
7 additions
and
7 deletions
templates/blocks/block--page-title-block.html.twig
+
1
−
1
View file @
7541074a
{%
if
featured_image
==
'no'
%}
{%
if
hero
==
'no'
%}
{%
{%
set
classes
=
[
set
classes
=
[
'block'
,
'block'
,
...
...
This diff is collapsed.
Click to expand it.
uw_fdsu_theme_resp.theme
+
6
−
6
View file @
7541074a
...
@@ -394,9 +394,9 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) {
...
@@ -394,9 +394,9 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) {
// If we do then, set variable to not show page title.
// If we do then, set variable to not show page title.
if
(
$variables
[
'plugin_id'
]
==
'page_title_block'
)
{
if
(
$variables
[
'plugin_id'
]
==
'page_title_block'
)
{
// Set the
featured image
variable to no, we will only
// Set the
hero
variable to no, we will only
// change if there is a
featured image
.
// change if there is a
hero
.
$variables
[
'
featured_image
'
]
=
'no'
;
$variables
[
'
hero
'
]
=
'no'
;
// Load the node.
// Load the node.
$node
=
\Drupal
::
routeMatch
()
->
getParameter
(
'node'
);
$node
=
\Drupal
::
routeMatch
()
->
getParameter
(
'node'
);
...
@@ -409,13 +409,13 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) {
...
@@ -409,13 +409,13 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) {
$node
=
Node
::
load
(
$node
);
$node
=
Node
::
load
(
$node
);
}
}
// If there is a node, check that it has a
featured image
.
// If there is a node, check that it has a
hero
.
if
(
$node
)
{
if
(
$node
)
{
// The UW service object.
// The UW service object.
$uwService
=
\Drupal
::
service
(
'uw_cfg_common.uw_service'
);
$uwService
=
\Drupal
::
service
(
'uw_cfg_common.uw_service'
);
$variables
[
'
featured_image
'
]
=
$uwService
->
uwCheckNodeFor
FeaturedImage
(
$node
);
$variables
[
'
hero
'
]
=
$uwService
->
uwCheckNodeFor
Hero
(
$node
);
}
}
}
}
...
@@ -508,7 +508,7 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
...
@@ -508,7 +508,7 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
// Set variables for featured image.
// Set variables for featured image.
$variables
[
'node_type'
]
=
str_replace
(
'_'
,
'-'
,
$node
->
getType
());
$variables
[
'node_type'
]
=
str_replace
(
'_'
,
'-'
,
$node
->
getType
());
$variables
[
'
featured_image
'
]
=
$uwService
->
uwCheckNodeFor
FeaturedImage
(
$node
);
$variables
[
'
hero
'
]
=
$uwService
->
uwCheckNodeFor
Hero
(
$node
);
// If there is a node object, get the header and footer data.
// If there is a node object, get the header and footer data.
if
(
$node
)
{
if
(
$node
)
{
...
...
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