Skip to content
Snippets Groups Projects
Commit 58f609a5 authored by Eric Bremner's avatar Eric Bremner Committed by Eric Bremner
Browse files

ISTWCMS-4704: fixing field name in getting image and adding in profiles to node content

parent c4c31b98
No related branches found
No related tags found
1 merge request!112Feature/istwcms 4704 m26lebla ebremner content types
......@@ -227,6 +227,24 @@ class UWService implements UWServiceInterface {
'url' => TRUE,
];
break;
case 'uw_ct_profile':
$tag_list = [
'field_uw_ct_profile_type',
];
$content_data = [
'title' => $get_header ? TRUE : NULL,
'sub_title' => $get_header ? 'field_uw_ct_profile_title' : NULL,
'affiliation' => $get_header ? 'field_uw_ct_profile_affiliation' : NULL,
'content' => $get_content ? 'layout_builder__layout' : NULL,
'image' => $get_header ? 'field_uw_ct_profile_image' : NULL,
'tags' => $get_footer ? $tag_list : NULL,
'link_profile' => $get_footer ? 'field_uw_ct_profile_info_link' : NULL,
'personal_webpage' => $get_footer ? 'field_uw_ct_profile_link_persona' : NULL,
];
break;
}
return $this->uwGetNodeData($node, $view_mode, $content_data);
......@@ -353,7 +371,7 @@ class UWService implements UWServiceInterface {
$image = [];
// Get the media id.
$mid = $node->field_uw_ct_contact_image->getValue();
$mid = $node->$field_name->getValue();
// If there is an image, process it.
if ($mid) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment