-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: static page component needs to load the content page tree for th…
…e breadcrumb even if the navigation is not shown (#1215)
- Loading branch information
Showing
6 changed files
with
104 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 24 additions & 26 deletions
50
src/app/shared/cms/components/content-navigation/content-navigation.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
<ng-container *ngIf="contentPageTree$ | async as contentPageTree"> | ||
<ng-container *ngIf="currentContentPage$ | async as currentContentPage"> | ||
<ul> | ||
<ng-container | ||
[ngTemplateOutlet]="pageTreeNode" | ||
[ngTemplateOutletContext]="{ treeNodes: [contentPageTree], counter: 0 }" | ||
></ng-container> | ||
</ul> | ||
<ng-container *ngIf="currentContentPage$ | async as currentContentPage"> | ||
<ul> | ||
<ng-container | ||
[ngTemplateOutlet]="pageTreeNode" | ||
[ngTemplateOutletContext]="{ treeNodes: [contentPageTree], counter: 0 }" | ||
></ng-container> | ||
</ul> | ||
|
||
<!-- the recursively used template to render the tree nodes --> | ||
<ng-template #pageTreeNode let-treeNodes="treeNodes" let-counter="counter"> | ||
<li | ||
*ngFor="let treeNode of treeNodes" | ||
[ngClass]="{ 'page-navigation-active': treeNode.contentPageId === currentContentPage.id }" | ||
<!-- the recursively used template to render the tree nodes --> | ||
<ng-template #pageTreeNode let-treeNodes="treeNodes" let-counter="counter"> | ||
<li | ||
*ngFor="let treeNode of treeNodes" | ||
[ngClass]="{ 'page-navigation-active': treeNode.contentPageId === currentContentPage.id }" | ||
> | ||
<a [routerLink]="treeNode | ishContentPageRoute" [title]="treeNode.name">{{ treeNode.name }}</a> | ||
<ul | ||
*ngIf="treeNode.children.length > 0 && ((!depth && depth !== 0) || depth >= counter)" | ||
[ngClass]="'page-navigation-' + counter" | ||
> | ||
<a [routerLink]="treeNode | ishContentPageRoute" [title]="treeNode.name">{{ treeNode.name }}</a> | ||
<ul | ||
*ngIf="treeNode.children.length > 0 && ((!depth && depth !== 0) || depth >= counter)" | ||
[ngClass]="'page-navigation-' + counter" | ||
> | ||
<ng-container | ||
[ngTemplateOutlet]="pageTreeNode" | ||
[ngTemplateOutletContext]="{ treeNodes: treeNode.children, counter: counter + 1 }" | ||
></ng-container> | ||
</ul> | ||
</li> | ||
</ng-template> | ||
</ng-container> | ||
<ng-container | ||
[ngTemplateOutlet]="pageTreeNode" | ||
[ngTemplateOutletContext]="{ treeNodes: treeNode.children, counter: counter + 1 }" | ||
></ng-container> | ||
</ul> | ||
</li> | ||
</ng-template> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters