Skip to content

Commit b88d1d2

Browse files
authored
Merge pull request #56 from reactome/31-faq-breadcrumb-links
fix: Removed unused links from FAQ breadcrumbs
2 parents 32ecbc5 + 8ce09c1 commit b88d1d2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

projects/website-angular/src/app/breadcrumb/breadcrumb.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ export class BreadcrumbComponent {
5555
this.updateBreadcrumbs(path_segments);
5656
}
5757
})
58+
} else if (path_segments.includes('faq') && path_segments.length > 2) { //In in an FAQ page, but not the main FAQ page
59+
//Remove all segements after 'faq' and before the last segment (which is the question)
60+
let faqIndex = path_segments.indexOf('faq');
61+
let modifiedSegments = [...path_segments];
62+
modifiedSegments.splice(faqIndex + 1, modifiedSegments.length - faqIndex - 2);
63+
this.updateBreadcrumbs(modifiedSegments);
5864
} else {
5965
this.updateBreadcrumbs(path_segments);
6066
}

0 commit comments

Comments
 (0)