Make breadcrumbs also as Input in search page
This commit is contained in:
parent
967aab00d3
commit
e5a644f2ae
|
@ -94,9 +94,9 @@ export class NewSearchPageComponent {
|
||||||
@Input() includeOnlyResultsAndFilter: boolean = false;
|
@Input() includeOnlyResultsAndFilter: boolean = false;
|
||||||
@Input() showBreadcrumb: boolean = false;
|
@Input() showBreadcrumb: boolean = false;
|
||||||
@Input() showDownload: boolean = true;
|
@Input() showDownload: boolean = true;
|
||||||
|
@Input() breadcrumbs: Breadcrumb[] = [];
|
||||||
public dashboard: boolean = properties.isDashboard;
|
public dashboard: boolean = properties.isDashboard;
|
||||||
|
private subscriptions = [];
|
||||||
subscriptions = [];
|
|
||||||
public parameterNames: string[] = [];
|
public parameterNames: string[] = [];
|
||||||
public parameterValues: string[] = [];
|
public parameterValues: string[] = [];
|
||||||
|
|
||||||
|
@ -109,7 +109,6 @@ export class NewSearchPageComponent {
|
||||||
public divContents = null;
|
public divContents = null;
|
||||||
public routerHelper: RouterHelper = new RouterHelper();
|
public routerHelper: RouterHelper = new RouterHelper();
|
||||||
public errorCodes: ErrorCodes = new ErrorCodes();
|
public errorCodes: ErrorCodes = new ErrorCodes();
|
||||||
breadcrumbs: Breadcrumb[] = [];
|
|
||||||
url = null;
|
url = null;
|
||||||
metaDescription = "";
|
metaDescription = "";
|
||||||
@Input() basicMetaDescription = [];
|
@Input() basicMetaDescription = [];
|
||||||
|
@ -174,15 +173,14 @@ export class NewSearchPageComponent {
|
||||||
this.updateMeta(this.pageTitle);
|
this.updateMeta(this.pageTitle);
|
||||||
});
|
});
|
||||||
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
||||||
|
if(this.breadcrumbs.length === 0) {
|
||||||
this.breadcrumbs.push({name: 'home', route: '/'});
|
this.breadcrumbs.push({name: 'home', route: '/'});
|
||||||
if(this.entityType === 'community') {
|
if (this.simpleView) {
|
||||||
this.breadcrumbs.push({name: this.pageTitle, route: null});
|
|
||||||
} else if (this.simpleView) {
|
|
||||||
this.breadcrumbs.push({name: "Search", route: null});
|
this.breadcrumbs.push({name: "Search", route: null});
|
||||||
} else if (!this.simpleView && this.advancedSearchLink) {
|
} else if (!this.simpleView && this.advancedSearchLink) {
|
||||||
this.breadcrumbs.push({name: "Advanced Search", route: null});
|
this.breadcrumbs.push({name: "Advanced Search", route: null});
|
||||||
}
|
}
|
||||||
//console.log(this.filters)
|
}
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => {
|
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => {
|
||||||
if (lastIndexUpdate) {
|
if (lastIndexUpdate) {
|
||||||
|
|
Loading…
Reference in New Issue