Replace PageContentComponent
In OneCX v6,
-
Replace PageContentComponent with OcxContentComponent when PageContentComponent has title and styleClass
-
Replace PageContentComponent with OcxContentContainerComponent when PageContentComponent is used for grouping multiple content sections together and support layout options.
Code Changes
-
Remove
PageContentComponentfrom@onecx/portal-integration-angular -
Add with
OcxContentComponentfrom@onecx/angular-accelerator -
For grouping, Add with
OcxContentContainerComponentfrom@onecx/angular-accelerator -
For single content sections, Replace tag
<ocx-page-content>with<ocx-content> -
For grouping multiple content sections, Replace tag
<ocx-page-content>with<ocx-content-container> -
Migrate input properties as per the mapping tables below
Example (OcxContentComponent)
<ocx-page-content
[styleClass]="'my-custom-class'"
>
<!-- content here -->
</ocx-page-content>
<ocx-content
[styleClass]="'my-custom-class'"
[title]="'My Page Title'"
>
<!-- content here -->
</ocx-content>
Example (OcxContentContainerComponent)
<h1>User Area</h1>
<page-content>
<h1>Profile</h1>
<app-profile-details></app-profile-details>
</page-content>
<page-content>
<h2>Settings</h2>
<app-settings-form></app-settings-form>
</page-content>
<ocx-content-container [title]="'User Area'">
<ocx-content [title]="'Profile'">
<app-profile-details></app-profile-details>
</ocx-content>
<ocx-content [title]="'Settings'">
<app-settings-form></app-settings-form>
</ocx-content>
</ocx-content-container>
Properties Mapping
PageContentComponent |
OcxContentComponent |
Notes |
|---|---|---|
styleClass |
styleClass |
Indicates css class, applied to container div |
- |
title |
(optional) Indicates the title of the content |
PageContentComponent |
OcxContentContainerComponent |
Notes |
|---|---|---|
styleClass |
styleClass |
Indicates css class, applied to container div |
- |
layout |
Sets layout direction of container Values: Default value: |
- |
breakpoint |
Sets breakpoint when horizontal layout switches to vertical layout Values: Default value: |