diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index fbc8cb24..e82b7f66 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -94,9 +94,9 @@ export class NewSearchPageComponent { @Input() includeOnlyResultsAndFilter: boolean = false; @Input() showBreadcrumb: boolean = false; @Input() showDownload: boolean = true; + @Input() breadcrumbs: Breadcrumb[] = []; public dashboard: boolean = properties.isDashboard; - - subscriptions = []; + private subscriptions = []; public parameterNames: string[] = []; public parameterValues: string[] = []; @@ -109,7 +109,6 @@ export class NewSearchPageComponent { public divContents = null; public routerHelper: RouterHelper = new RouterHelper(); public errorCodes: ErrorCodes = new ErrorCodes(); - breadcrumbs: Breadcrumb[] = []; url = null; metaDescription = ""; @Input() basicMetaDescription = []; @@ -174,15 +173,14 @@ export class NewSearchPageComponent { this.updateMeta(this.pageTitle); }); this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl; - this.breadcrumbs.push({name: 'home', route: '/'}); - if(this.entityType === 'community') { - this.breadcrumbs.push({name: this.pageTitle, route: null}); - } else if (this.simpleView) { - this.breadcrumbs.push({name: "Search", route: null}); - } else if (!this.simpleView && this.advancedSearchLink) { - this.breadcrumbs.push({name: "Advanced Search", route: null}); + if(this.breadcrumbs.length === 0) { + this.breadcrumbs.push({name: 'home', route: '/'}); + if (this.simpleView) { + this.breadcrumbs.push({name: "Search", route: null}); + } else if (!this.simpleView && this.advancedSearchLink) { + this.breadcrumbs.push({name: "Advanced Search", route: null}); + } } - //console.log(this.filters) if (typeof document !== 'undefined') { this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => { if (lastIndexUpdate) {