I was trying to modify footer section with outlets by defining:
<ng-container *ngIf="templateName$ | async">
<ng-template *ngIf="true" cxOutletRef="footer">
</ng-template>
</ng-container>
and footer section is not replaced. Is it possible to replace footer/header for specific templates? As a result of this code, templateName is properly resolved from PageLayoutService, but it replacing does not work. Also tried
<ng-container *ngIf="(templateName$ | async) === expectedTemplateName">
<ng-template cxOutletRef="footer">
</ng-template>
</ng-container>
but still no luck. Any hints? It would be great to modify/change header as well, Thanks!
There are various ways to customise the header/footer of a page:
cx-storefront
) and implement the footer in a custom way. You can leverage the page-layout and page-slot component to render CMS content. Hope that gives you and idea or two.
Here's a bit more info on page template driven classes for page specific styling. Given that the header/footer do not benefit from the page template based class (as it's only available inside the router outlet), you could implement this in your app, I've updated the Stackblitz example for you with an example.