Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_fdsu_theme_resp
Commits
3ea31348
Commit
3ea31348
authored
Dec 09, 2021
by
Eric Bremner
Browse files
Merge remote-tracking branch 'origin/1.0.x' into ebremner-m26lebla-watitis
parents
be197b6f
accfad9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
templates/blocks/block--page-title-block.html.twig
View file @
3ea31348
{%
if
featured_image
==
'no'
%}
{%
if
media
==
'no'
%}
{%
set
classes
=
[
'block'
,
...
...
uw_fdsu_theme_resp.theme
View file @
3ea31348
...
...
@@ -394,9 +394,9 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) {
// If we do then, set variable to not show page title.
if
(
$variables
[
'plugin_id'
]
==
'page_title_block'
)
{
// Set the
featured image
variable to no, we will only
// change if there is a
featured image
.
$variables
[
'
featured_image
'
]
=
'no'
;
// Set the
media
variable to no, we will only
// change if there is a
media
.
$variables
[
'
media
'
]
=
'no'
;
// Load the node.
$node
=
\
Drupal
::
routeMatch
()
->
getParameter
(
'node'
);
...
...
@@ -409,13 +409,13 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) {
$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
media
.
if
(
$node
)
{
// The UW service object.
$uwService
=
\
Drupal
::
service
(
'uw_cfg_common.uw_service'
);
$variables
[
'
featured_image
'
]
=
$uwService
->
uwCheckNodeFor
FeaturedImage
(
$node
);
$variables
[
'
media
'
]
=
$uwService
->
uwCheckNodeFor
Media
(
$node
);
}
}
...
...
@@ -508,7 +508,7 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
// Set variables for featured image.
$variables
[
'node_type'
]
=
str_replace
(
'_'
,
'-'
,
$node
->
getType
());
$variables
[
'
featured_image
'
]
=
$uwService
->
uwCheckNodeFor
FeaturedImage
(
$node
);
$variables
[
'
media
'
]
=
$uwService
->
uwCheckNodeFor
Media
(
$node
);
// If there is a node object, get the header and footer data.
if
(
$node
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment