Skip to content

Using CMS

Charles Alleman edited this page Jan 10, 2020 · 1 revision

What is the 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.

Loading CMS page

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 {}

Adding CMS page to application

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.

Clone this wiki locally