Skip to content

Commit

Permalink
updates CH query to include primary position for people profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
kasprzyk-sz committed Aug 1, 2023
1 parent 94685c1 commit 81f34cd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion wp-content/plugins/vf-group-header-block/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
'hide[team,mobile,phones]' => 1,
'sort-field-value[changed]' => 'DESC',
'filter-ref-entity[field_person_positions][title]' => "",
'filter-field-value[field_person_positions.entity.field_position_membership]' => 'leader'
'filter-field-value[field_person_positions.entity.field_position_membership]' => 'leader',
'filter-ref-entity[field_person_positions][field_position_primary]' => 1

);

if ($is_minimal) {
Expand Down
5 changes: 3 additions & 2 deletions wp-content/plugins/vf-members-block/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
'sort-field-value[field_person_full_name]' => 'ASC',
'filter-fields-empty' => 'field_person_visible_internally',
'filter-ref-entity[field_person_positions][title]' => "",
'hide[team,' . $hide_fields . ']' => 1
'hide[team,' . $hide_fields . ']' => 1,
'filter-ref-entity[field_person_positions][field_position_primary]' => 1
);

if ($leader !== true) {
Expand Down Expand Up @@ -120,7 +121,7 @@

$content = preg_replace(
'#^(\s*<[^>]+?vf-content-hub-html)#',
'$1 vf-grid vf-grid__col-' . $columns,
'$1 vf-grid vf-grid__col-' . $columns . ' | vf-u-margin__bottom--800',
$content
);

Expand Down
2 changes: 2 additions & 0 deletions wp-content/plugins/vf-members-block/vf-person/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
'limit' => 1,
'filter-ref-entity[field_person_positions][title]' => "",
'hide[' . $hide_fields . ']' => 1,
'filter-ref-entity[field_person_positions][field_position_primary]' => 1

), $url);

// Add search field query var
Expand Down
4 changes: 3 additions & 1 deletion wp-content/plugins/vf-members-internal/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
'sort-field-value[field_person_name_last]' => 'DSC',
'filter-fields-empty' => 'field_person_visible_internally',
'filter-ref-entity[field_person_positions][title]' => "",
'hide[team,' . $hide_fields . ']' => 1
'hide[team,' . $hide_fields . ']' => 1,
'filter-ref-entity[field_person_positions][field_position_primary]' => 1

);

if ($leader !== true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
'limit' => 1,
'filter-ref-entity[field_person_positions][title]' => "",
'hide[' . $hide_fields . ']' => 1,
'filter-ref-entity[field_person_positions][field_position_primary]' => 1

), $url);

// Add search field query var
Expand Down

0 comments on commit 81f34cd

Please sign in to comment.