From 86d33894382029b8cab73c894491329063fdaecd Mon Sep 17 00:00:00 2001 From: lhenze Date: Fri, 23 Aug 2019 17:52:29 -0400 Subject: [PATCH] One approach --- .../comcol-page-browse-by.component.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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) ; } }