Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
WCMS
uw_fdsu_theme_resp
Commits
78d2e148
Commit
78d2e148
authored
Nov 12, 2021
by
Eric Bremner
Browse files
ISTWCMS-5195: updating to use new node theming methods
parent
b629ebc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
templates/node/node.html.twig
templates/node/node.html.twig
+1
-2
uw_fdsu_theme_resp.theme
uw_fdsu_theme_resp.theme
+6
-6
No files found.
templates/node/node.html.twig
View file @
78d2e148
...
@@ -95,8 +95,7 @@
...
@@ -95,8 +95,7 @@
{%
block
content
%}
{%
block
content
%}
<div
{{
content_attributes.addClass
(
'node__content'
)
}}
>
<div
{{
content_attributes.addClass
(
'node__content'
)
}}
>
{%
include
'@components/card/card--node/card--node.twig'
with
{
{%
include
'@components/card/card--node/card--node.twig'
with
{
'node'
:
node_data
,
'node'
:
node_data
'featured_image'
:
featured_image
,
}
%}
}
%}
</div>
</div>
{%
endblock
%}
{%
endblock
%}
...
...
uw_fdsu_theme_resp.theme
View file @
78d2e148
...
@@ -366,15 +366,15 @@ function uw_fdsu_theme_resp_preprocess_node(&$variables) {
...
@@ -366,15 +366,15 @@ function uw_fdsu_theme_resp_preprocess_node(&$variables) {
// If on a teaser page get the variables for teaser.
// If on a teaser page get the variables for teaser.
if
(
$variables
[
'view_mode'
]
==
'teaser'
&&
if
(
$variables
[
'view_mode'
]
==
'teaser'
&&
in_array
(
$variables
[
'node'
]
->
getType
(),
$teasers_to_preprocess
))
{
in_array
(
$variables
[
'node'
]
->
getType
(),
$teasers_to_preprocess
))
{
$variables
[
'teaser'
]
=
$nodeContent
->
getNodeContent
(
$variables
[
'node'
],
'teaser'
,
'all'
,
$uwService
->
uwGetNodePreprocessing
(
'featured_image'
)
);
$variables
[
'teaser'
]
=
$nodeContent
->
getNodeContent
(
$variables
[
'node'
],
'teaser'
,
'all'
);
}
}
// If on a node page get the variables for now.
// If on a node page get the variables for now.
if
(
$variables
[
'view_mode'
]
==
'full'
&&
if
(
$variables
[
'view_mode'
]
==
'full'
&&
in_array
(
$variables
[
'node'
]
->
getType
(),
$nodes_to_preprocess
))
{
in_array
(
$variables
[
'node'
]
->
getType
(),
$nodes_to_preprocess
$variables
[
'node_data'
]
=
$nodeContent
->
getNodeContent
(
$variables
[
'node'
],
'full'
,
'all'
,
$uwService
->
uwGetNodePreprocessing
(
'featured_image'
));
))
{
$variables
[
'node_data'
]
=
$nodeContent
->
getNodeContent
(
$variables
[
'node'
],
'full'
,
'all'
);
$variables
[
'node_data'
][
'content'
]
=
$variables
[
'content'
];
$variables
[
'node_data'
][
'content'
]
=
$variables
[
'content'
];
$variables
[
'featured_image'
]
=
$uwService
->
uwCheckNodeForFeaturedImage
(
$variables
[
'node'
]);
}
}
// Unset the content variable, so that we do not get
// Unset the content variable, so that we do not get
...
@@ -512,8 +512,8 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
...
@@ -512,8 +512,8 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
// 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
)
{
$variables
[
'header_data'
]
=
$uwNodeContent
->
getNodeContent
(
$node
,
'teaser'
,
'header'
,
$uwService
->
uwGetNodePreprocessing
(
'featured_image'
)
);
$variables
[
'header_data'
]
=
$uwNodeContent
->
getNodeContent
(
$node
,
'teaser'
,
'header'
);
$variables
[
'footer_data'
]
=
$uwNodeContent
->
getNodeContent
(
$node
,
'teaser'
,
'footer'
,
$uwService
->
uwGetNodePreprocessing
(
'featured_image'
)
);
$variables
[
'footer_data'
]
=
$uwNodeContent
->
getNodeContent
(
$node
,
'teaser'
,
'footer'
);
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
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