Skip to content

Commit

Permalink
Changed fallback for customBaseUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
jonleverrier committed Mar 15, 2019
1 parent 6769f74 commit 62b4404
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/services/BreadcrumbService.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public function buildBreadcrumb($settings) : array
{
// get and set settings array
$homeTitle = $settings['homeTitle'] ?? 'Home';
$homeUrl = $settings['homeUrl'] ?? null;
$customBaseUrl = $settings['customBaseUrl'] ?? null;
$customBaseUrl = $settings['homeUrl'] ?? $settings['customBaseUrl'] ?? null;
$skipUrlSegment = $settings['skipUrlSegment'] ?? null;
$customFieldHandleEntryId = $settings['customFieldHandleEntryId'] ?? 0;
$customFieldHandle = $settings['customFieldHandle'] ?? null;
Expand All @@ -59,8 +58,8 @@ public function buildBreadcrumb($settings) : array
$element = '';

// reset baseURL for custom customBaseUrl
if ($homeUrl || $customBaseUrl) {
$baseUrl = $homeUrl ?? $customBaseUrl;
if ($customBaseUrl) {
$baseUrl = $customBaseUrl;
}

// for each segment in array
Expand Down

0 comments on commit 62b4404

Please sign in to comment.