diff --git a/app/templates/element/subnavigation/upperButtons.php b/app/templates/element/subnavigation/upperButtons.php index 7d6bb930..6a1eb865 100644 --- a/app/templates/element/subnavigation/upperButtons.php +++ b/app/templates/element/subnavigation/upperButtons.php @@ -36,10 +36,10 @@ ) { return; } - -$enrollmentFlowId = $vv_obj->id; -if($vv_controller != 'EnrollmentFlows') { - $enrollmentFlowId = $vv_primary_link_obj->id; + +$enrollmentFlowId = (!empty($vv_primary_link_obj->id) ? $vv_primary_link_obj->id : null); +if($vv_action == 'edit' || $vv_action == 'view') { + $enrollmentFlowId = $vv_obj->id; } $startButtonUrl = $this->Url->build(