Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
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_cfg_common
Commits
00a7471b
Commit
00a7471b
authored
3 years ago
by
Eric Bremner
Committed by
Igor Biki
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5195: updating profiles to new node theming
parent
0b35918d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!169
Feature/istwcms 5195 ebremner node theming
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Service/UwNodeContent.php
+28
-16
28 additions, 16 deletions
src/Service/UwNodeContent.php
with
28 additions
and
16 deletions
src/Service/UwNodeContent.php
+
28
−
16
View file @
00a7471b
...
...
@@ -140,7 +140,8 @@ class UwNodeContent {
else
{
if
(
$content
==
'header'
)
{
$node_flags
[
'get_header'
]
=
TRUE
;
$node_flags
[
'get_image'
]
=
TRUE
;
$node_flags
[
'get_title'
]
=
TRUE
;
$node_flags
[
'get_hero'
]
=
TRUE
;
}
if
(
$content
==
'footer'
)
{
...
...
@@ -485,22 +486,33 @@ class UwNodeContent {
*/
public
function
getProfileContent
(
array
$node_flags
):
array
{
$tag_list
=
[
'field_uw_ct_profile_type'
,
];
// Get the content data.
$content_data
=
$this
->
setupContentData
(
$node_flags
);
return
[
'title'
=>
$node_flags
[
'get_title'
]
?
TRUE
:
NULL
,
'position'
=>
$node_flags
[
'get_header'
]
?
'field_uw_ct_profile_title'
:
NULL
,
'affiliation'
=>
$node_flags
[
'get_header'
]
?
'field_uw_ct_profile_affiliation'
:
NULL
,
'content'
=>
$node_flags
[
'get_content'
]
?
'field_uw_profile_summary'
:
NULL
,
'image'
=>
$node_flags
[
'get_header'
]
?
'field_uw_ct_profile_image'
:
NULL
,
'sources'
=>
$node_flags
[
'get_image'
]
?
'field_uw_ct_profile_image'
:
NULL
,
'tags'
=>
$node_flags
[
'get_footer'
]
?
$tag_list
:
NULL
,
'link_profile'
=>
$node_flags
[
'get_footer'
]
?
'field_uw_ct_profile_info_link'
:
NULL
,
'personal_webpage'
=>
$node_flags
[
'get_footer'
]
?
'field_uw_ct_profile_link_persona'
:
NULL
,
'url'
=>
TRUE
,
];
// Setup the header content.
if
(
$node_flags
[
'get_header'
])
{
$content_data
[
'header'
][
'position'
]
=
$this
->
addToContentData
(
'plain_text'
,
'field_uw_ct_profile_title'
);
}
// Setup the actual content.
if
(
$node_flags
[
'get_content'
])
{
$content_data
[
'content'
]
=
$this
->
addToContentData
(
'content'
,
'field_uw_news_summary'
);
}
// Get the footer for the profile.
if
(
$node_flags
[
'get_footer'
])
{
$content_data
[
'footer'
][
'links'
][
'has_children'
]
=
TRUE
;
$content_data
[
'footer'
][
'links'
][
'profile'
]
=
$this
->
addToContentData
(
'link'
,
'field_uw_ct_profile_info_link'
);
$content_data
[
'footer'
][
'links'
][
'webpage'
]
=
$this
->
addToContentData
(
'link'
,
'field_uw_ct_profile_link_persona'
);
$content_data
[
'footer'
][
'tags'
]
=
$this
->
addToContentData
(
'terms'
,
[
'field_uw_ct_profile_type'
,
]
);
}
return
$content_data
;
}
/**
...
...
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