-
Notifications
You must be signed in to change notification settings - Fork 1
Using CMS
A CMS page is content in the workbench-client which is generated by a third party CMS service. This handles converting mostly text based content into HTML format before passing the end result to the workbench-client. Uses for the CMS are when a page or a portion of a page has little to no processing required. Examples of CMS pages are the credits, disclaimers, and ethics pages of the workbench-client. Each of these are mostly text based pages which can be adequately handled by a CMS service.
To create a CMS component you must use the <app-cms>
directive. To do this, add the following import to your component module:
@NgModule({
...
imports: [SharedModule, ...]
})
After this add the <app-cms>
directive to the relevant position in the component. An example can be seen below:
@Component({
selector: "app-example",
template: `
<!-- Anything you want here -->
<app-cms page="example.html"></app-cms>
<!-- Anything you want here -->
`
})
export class ExampleComponent {}
To add a CMS page to the application, currently you must add the .html
page to the src/assets/content
folder. This position is temporary until a third party CMS is setup at which point the location will change. The name of the .html
is what you will pass the cms directive to add it to the website so name it carefully.