One approach

This commit is contained in:
lhenze
2019-08-23 17:52:29 -04:00
parent b73ad7a8f0
commit 86d3389438

View File

@@ -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) ;
}
}