diff --git a/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts b/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts index 950d122425..7f49b767db 100644 --- a/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts +++ b/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts @@ -16,7 +16,21 @@ export class ComcolPageBrowseByComponent implements OnInit { * The ID of the Community or Collection */ @Input() id: string; - @Input() thisurl: string; + @Input() contentType: string; + + /** + * getPathfromType + */ + getPathfromType(t) { + if (t === "collection") { + t = "/collections/"; + } else if (t === "community") { + t = "/communities/"; + } else { + t = "/"; + } + return t; + } /** * List of currently active browse configurations @@ -28,6 +42,7 @@ export class ComcolPageBrowseByComponent implements OnInit { ngOnInit(): void { this.types = this.config.browseBy.types; + this.contentTypePath = this.getPathfromType(this.contentType) ; } }