Blog

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

Using Placeholders in the CMS

This blog post shows you one of the advanced functions of CMS on open bi.

Open bi replaces the follwing placeholders on any HTML page that is published by the server. You can use them:

  • in the source code of the CMS master page
  • any page in the CMS role
  • in an HTML item

Example

<!DOCTYPE html> <html lang="de"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>open bi - %PAGE_TITLE%></title> <openbi:htmltemplate data-template="biexcellence_shared_assets"></openbi:htmltemplate> </head> <body class="%BODY_CLASS%" data-spy="scroll" data-target="#content-scrollspy" data-offset="100">

The following list of placeholders is devided into general CMS or page placeholders, placeholders referencing the role content or placeholders for HTML Item related content, antiforgery and organizational placeholders:

References to CMS / page

Placeholder
Documentation
Placeholder
%CMS_URL%
Documentation
The URL of the current page
Placeholder
%CMS_PATH%
Documentation
The absolute URL path of the current page
Placeholder
%META_TAGS%
Documentation
The meta tags of the page
Placeholder
%META_PROPERTIES%
Documentation
The meta property tags of the page

References to the Role

Placeholder
Documentation
Placeholder
%PAGE_TITLE%
Documentation
The title of the Role Content
Placeholder
%DESCRIPTION%
Documentation
The description of the Role Content
Placeholder
%KEYWORDS%
Documentation
The keywords of the Role Content

References to HTML Items

Placeholder
Documentation
Placeholder
%CSS_INCLUDES%
Documentation
The CSS style includes from the HTML Items
Placeholder
%SCRIPT_INCLUDES%
Documentation
The JavaScript includes from the HTML Items
Placeholder
%BODY_CLASS%
Documentation
The body classes from the HTML Items

Antiforgery placeholders

Placeholder
Documentation
Placeholder
%ANTIFORGERY_TOKEN%
Documentation
The antiforgery token for form submissions
Placeholder
%ANTIFORGERY_NAME%
Documentation
The antiforgery field name for form submissions
Placeholder
%ANTIFORGERY_HEADER%
Documentation
The antiforgery header name

Organizational placeholders

In general all fields of the organization (ORGA_*), the user (USER_*) and the host header (HOSTHEADER_*) can be used in the placehoder. This also includes custom fields that you added using the Table Attributes.

In this documentation only some examples are given. To find all possible fields and their technical names, please refer to the entity documentation.

If the user is not logged in, open bi will not be able to replace the ORGA_* and USER_* placeholders!

Placeholder
Documentation
Placeholder
%HOSTHEADER_URL%
Documentation
The hostheader of the current page
Placeholder
%ORGA_ID%
Documentation
The ID of the organization of the currently logged in user
Placeholder
%ORGA_ORGUNIT%
Documentation
The description of the organization of the currently logged in user
Placeholder
%USER_BARUSER%
Documentation
The currently logged in user name
Placeholder
%USER_LASTNAME%
Documentation
The currently logged in user's lastname
Placeholder
%USER_FIRSTNAME%
Documentation
The currently logged in user's first name
Placeholder
%USER_SALUTATION%
Documentation
The currently logged in user's salutation
Placeholder
%USER_CITY%
Documentation
The currently logged in user's city

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