Blog

On this page you will find Tutorials, How-Tos and Tips for developing with open bi.

Create a new CMS

This blog post is a tutorial on how to create a new CMS on open bi.

Create a Role

The role or more specifically the role content defines the structure of the CMS. Each folder is a separate page which can have subpages and can be restricted to specific user groups.

To create a new role open the open bi Configurator and go to CMS:

Then create a new role by clicking on the context icon next to Roles and choose Add:

Enter a Name and Description, then Save.

To create pages in the role, click on the context icon of the newly created role and choose Add:

Specify the relative URL path of the page as Name and Save:

Pages can also be restricted to specific Usergroups.

The CMS requires a specific role content folder structure as shown in this example:

The "content" folder on position "0" is the only requirement and is the entry page for the CMS. This is the URL path structure for each folder:

Folder
URL path
Folder
content
URL path
"/"
Folder
Products
URL path
"/Products"
Folder
majaAI
URL path
"/Products/majaAI"
Folder
open bi Technology
URL path
"/open-bi-technology"
Folder
footer
URL path
no URL mapping
Folder
hidden
URL path
no URL mapping

The HTML for each folder (page) can be edited by double clicking on the folder:

The context icon next to the page provides you several editing fuctions:

Via CMS it is possible to specify a Page Title (%PAGE_TITLE%), a Description (%DESCRIPTION%), Keywords (%KEYWORDS%) and if the page requires an authenticated user.

If you want to translate the CMS, choose Language (also see Add mulit-lanugage support to your CMS on this topic).

Create a CMS master page

The CMS master page contains the HTMLfor the general layout of the CMS. The placeholder for including the content of the active page is the following special html content tag:

<content></content>

For details see the HTML item documentation.

To create a new website master page go to CMS in the open bi Configurator.

Expand CMS Item Templates and search for the PAGE node. Click on the context icon next to it and choose Add.

Give the new page a name. Then Save.

The content of the CMS master page can be edited by clicking on the newly created PAGE.

Create a Host Header

The Host Header combines the CMS master page and the role and makes them accessible to the browser for a specific HTTP host header.

To create a new host header go to Host Header in the open bi Configurator:

Then create a host header by clicking on the + icon.

Specify the host without protocol and port. Then select the website master Page and the Role that you have created earlier.

Then Save your changes.

Now go to the browser and navigate to “http://localhost:9091” and the CMS should be visible.

Custom Table Attributes

All entities in the open bi Server can be customized with custom table attributes to add additional fields to the entities.

Here is a list of the custom table attributes on Roles which have a special meaning to the CMS:

Name
Documentation
Folder
LOGIN_URL
Documentation
The URL to redirect to if the user is not logged in and the page requires an authenticated user. Example: "/login"
Folder
LOGIN_INDEX_URL
Documentation
The URL to redirect to if the user logged in on the “LOGIN_URL” page. Example: "/home"
Folder
CHANGE_PASSWORD_URL
Documentation
The URL to redirect to if the user is logged in but requires a password change. Example: "/changepassword"

Here is a list of the custom table attributes on Host Headers which have a special meaning to the CMS.

Name
Documentation
Folder
REQUIRE_XSRF
Documentation
Prevents Cross-Site Request Forgery by requiring a “XSRF- TOKEN” Cookie (which the server automatically provides for its responses) and either a “%ANTIFORGERY_HEADER%” header or a “%ANTIFORGERY_NAME%” form field with the “%ANTIFORGERY_TOKEN%” value.
Folder
IP_WHITELIST
Documentation
Space separated list of IPs which are allowed. Example: "127.0.0.1 8.8.8.8"
Folder
IP_BLACKLIST
Documentation
Space separated list of IPs which are not allowed.

Thilo Knötzele
Author: Thilo Knötzele
Creation date: 02.07.2021
Category: Web Development
back to overview