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
9fee5b0b
Commit
9fee5b0b
authored
2 years ago
by
Eric Bremner
Committed by
Kevin Paxman
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5880: using media flags instead of logic in PL
parent
d596a31e
No related branches found
No related tags found
1 merge request
!85
ISTWCMS-5880: adding logic for headers/title in contacts
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
templates/blocks/block--page-title-block.html.twig
+1
-8
1 addition, 8 deletions
templates/blocks/block--page-title-block.html.twig
templates/node/node.html.twig
+2
-1
2 additions, 1 deletion
templates/node/node.html.twig
uw_fdsu_theme_resp.theme
+8
-3
8 additions, 3 deletions
uw_fdsu_theme_resp.theme
with
11 additions
and
12 deletions
templates/blocks/block--page-title-block.html.twig
+
1
−
8
View file @
9fee5b0b
{%
set
show_title
=
TRUE
%}
{%
if
hide_page_title
%}
{%
set
show_title
=
FALSE
%}
{%
elseif
media
==
'yes'
%}
{%
set
show_title
=
FALSE
%}
{%
endif
%}
{%
if
show_title
%}
{%
if
show_title
%}
{%
set
classes
=
[
'block'
,
...
...
This diff is collapsed.
Click to expand it.
templates/node/node.html.twig
+
2
−
1
View file @
9fee5b0b
...
...
@@ -100,7 +100,8 @@
<div
{{
content_attributes.addClass
(
'node__content'
)
}}
>
{%
include
'@components/card/card--node/_card--node.twig'
with
{
'node'
:
node_data
,
'type'
:
'node'
'type'
:
'node'
,
'media_flags'
:
media_flags
}
%}
</div>
{%
endblock
%}
...
...
This diff is collapsed.
Click to expand it.
uw_fdsu_theme_resp.theme
+
8
−
3
View file @
9fee5b0b
...
...
@@ -506,10 +506,15 @@ function uw_fdsu_theme_resp_preprocess_block(&$variables) {
// Load the node.
$node
=
\Drupal
::
routeMatch
()
->
getParameter
(
'node'
);
// If this is a node, check for contact and set if we
// have to hide the title.
if
(
$node
=
\Drupal
::
routeMatch
()
->
getParameter
(
'node'
))
{
if
(
$node
->
getType
()
==
'uw_ct_contact'
)
{
$variables
[
'hide_page_title'
]
=
TRUE
;
}
// Get the media falgs
$media_flags
=
\Drupal
::
service
(
'uw_cfg_common.uw_service'
)
->
uwGetMediaFlags
(
$node
);
// Set the show title flag.
$variables
[
'show_title'
]
=
$media_flags
[
'has_media'
]
?
FALSE
:
TRUE
;
}
// ISTWCMS-4943: ensure that we get a node object.
...
...
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