Custom content
The Custom content portlet allows users to create a fully customizable portlet using HTML and CSS. It supports images and styled content, enabling tailored presentation to fit specific needs.
General
General data is required for all portlets, see General.
Advanced settings
Enable Print: When enabled, the end user will see a Print option in the portlet header context menu. The portlet content will be printed as a PDF. Note that the background color will be forced when printing from the custom content portlet.
Events
To set up an event, see Events.
Data
To set up a data source, see Data.
Adding a data source is optional and not required for the Custom Content Portlet. It can be used when dynamic content is needed, but event data and static HTML and CSS can be sufficient for many use cases.
Data source columns
In the data source column, you can change column names and set their types. Click Manage to access a grid view of the configuration.
Click Execute in the data source section to fetch the columns. Each column can be configured with:
display name
column type
Presentation
Write your Custom Content in the Presentation tab using one HTML editor for content and one CSS editor for styling. The HTML editor appears above the CSS editor.
Define layouts, containers, CSS classes and repeating content directly in the HTML. Separate sections and their Static/Dynamic and container settings are no longer used.
Expand the editors
Use the expand control to open both editors together in a larger workspace, with HTML on the left and CSS on the right. Drag the divider to adjust their widths. Each editor retains a minimum width so both remain visible.
Expanding and collapsing preserves your content, cursor position, scroll position and undo history. Suggestions, hover information and error indicators remain available in the expanded view.
Editor guidance
The HTML editor shows how much of the character limit you have used. Suggestions help you insert data source columns, event fields and configured interactions.
Inline styles
You can style individual elements directly in the HTML using the style attribute:
Use the CSS editor to define shared styling and the style attribute for styling individual elements. Inline styles are subject to safety checks, and disallowed styling is removed by Auto-fix.
Repeating content
Wrap content in <template data-nc-repeat> to display it once for each row in the data source:
The template wrapper itself is not displayed.
Content outside repeat blocks appears once, with data source values taken from the first row. If the data source returns no rows, repeat blocks display nothing, while the rest of the document remains visible.
You can use several repeat blocks in one document. Each repeats over the full set of data rows. Multiple elements inside a block repeat together, so one data row can produce several elements, such as two consecutive table rows. Repeat blocks can also be used inside tables.
FlowScript in HTML
Use FlowScript expressions throughout the HTML document, both inside and outside repeat blocks. Expressions support conditionals, let bindings, queries, operators, function calls and string interpolation.
{Events.Field}uses event data and updates when that data changes, without reloading the portlet’s data source.{Phrase.Key}displays the translated phrase and updates when translations change.Use
\{and\}to display literal braces instead of starting or ending an expression.
Typing {, . or ( offers suggestions, including data source columns, event fields, configured interactions and FlowScript language suggestions. Hover over an expression to see its type information. Invalid expressions are marked on the relevant line with an explanation.
Keep each expression entirely inside or outside a repeat block. An expression cannot cross a repeat block boundary. Repeat markup written inside an expression’s string value is treated as text, not as a repeat block.
You can also write HTML without any FlowScript expressions.
Interactions and events
Elements linked to an app or component run it using the clicked row’s data, including when you click an element nested within repeating content. Elements linked to a Portal page navigate to that page.
Clicking a repeated row selects it and sends its data to listening portlets. Clicking the same row again deselects it and clears the selection in those portlets.
Renaming an interaction updates its references in the HTML. Deleting an interaction removes its references. Interactions no longer referenced in the document are removed when you select Apply.
Pagination, printing, clearing filters and clearing user settings continue to work as before.
Validation and safety checks
The editor identifies disallowed HTML on the line where it occurs. Previewing or saving is blocked until the problems are resolved. Auto-fix removes disallowed markup while preserving the remaining content and indentation. HTML comments and valid repeat blocks are preserved.
CSS in the CSS editor and inline style attributes is checked for disallowed styling. Use Auto-fix to remove unsupported content.
The following rules apply:
HTML cannot be empty or exceed 100,000 characters.
Use
data-nc-repeatwithout a value. Repeating a named list is not supported.Keep FlowScript expressions entirely inside or outside repeat blocks.
A plain
<template>withoutdata-nc-repeathas no effect. The editor displays a warning explaining the required form, but the warning does not block saving.
Pagination
Enable Pagination: Check this option to enable a pagination footer. You can set the number of items per page and choose whether to display the pagination footer when all results fit on a single page.
Interactions
In the Custom Content portlet, it's possible to add actions on click — either to run an app or component, or to navigate to a different Portal page.
The action is configured by first selecting the app, component, or Portal page, and then referencing the action in an html section under Presentation.
Apps or Components
1) Configure the app/component to be used
Click Add to create a new section.
Applications – Use the dropdown list to select the app or component to be run.
Reference Name – A reference name is automatically suggested based on the app/component name, but you can edit it if needed.
2) Add the link in the HTML
Go to the Presentation tab and locate the position in the HTML section where the link should be added.
Type
{to open the suggestion list and select the desired app or component. The available apps/components will be prefixed withClick.Click Preview or Apply to test the link.
Portal Pages
1) Configure the portal page you wish to navigate to
Click Add to create a new section.
Select a page – Use the dropdown list to select the page you wish to navigate to.
Reference Name – This is used internally to identify the link and is not shown in the rendered HTML. You can edit it if needed.
2) Add the link in the html
Go to the Presentation tab and locate the position in the HTML section where the link should be added.
Type
{to open the suggestion list and select the desired page by reference name. The pages will be prefixed withPortalPage.Click Preview or Apply to test the link.
Standalone link: The
<a>tag remains and appears as a clickable link in the UI.Embedded in your own html: If you add the page attribute to another element (e.g., a
<span>), the original<a>is removed during cleanup when you click Preview or Apply.
Link Behavior
Standalone link (with full link support):
Link embedded in complex HTML (with full link support):
Moved page attribute to another element (no native link support):
Style
To configure style, see Style.
HTML and CSS sanitization guide
HTML Sanitization
Allowed HTML Elements
The system permits specific HTML elements for custom content, organized by categories:
Document Structure Elements
header, footer, nav, side, div, section, article, aside, address, details
Text Elements
p, span, a, br, h1-h6, strong, em, blockquote, pre, code, b, i, u, s, strike, q, cite, abbr, figcaption, figure, center
List Elements
ul, ol, li, dd, dl, dt
Table Elements
table, thead, tbody, tfoot, tr, th, td, col, colgroup, caption
Form Elements
button, input, textarea, select, option, label, form
SVG Elements
svg, g, rect, circle, ellipse, line, polyline, polygon, path, text, use, viewBox
Allowed HTML Attributes
Common Attributes (available for most elements)
id
class
Link-specific Attributes (for <a> tags)
href
name
target
rel
Media Attributes (for <img> tags)
src
alt
width
height
Table-specific Attributes
scope
colspan
rowspan
width
height
Form Attributes
name
value
type
placeholder
required
disabled
readonly
autocomplete
autofocus
min/max
minlength/maxlength
pattern
step
multiple
checked
selected
accept
size
rows/cols
for (label elements)
SVG Attributes
x, y, width, height
cx, cy, r, rx, ry
x1, y1, x2, y2
points
d
viewBox
fill
stroke
stroke-width
opacity
transform
URL Security
Allowed URL Schemes
Only the following URL schemes are permitted:
https
mailto
tel
URL Attributes
URL schemes are only applied to these attributes:
href
src
cite
Always Blocked HTML Elements
The following elements are blocked for security reasons:
style
html
script
body
link
Disallowed HTML Attributes
Any attribute not explicitly included in the allowed list will be sanitized, including:
Event handlers (onclick, onload, etc.)
Style attributes (style)
Script-related attributes (javascript: URLs)
Custom data attributes (data-*)
Meta attributes (http-equiv, content)
CSS Sanitization
Always Disallowed CSS Properties
The following CSS properties are always disallowed for security reasons:
behavior
expression
binding
moz-binding
ms-behavior
o-behavior
zoom
pointer-events
mask
mask-image
mask-border
appearance
Disallowed CSS Functions
The following functions in CSS are considered dangerous and are disallowed:
behavior()
attr()
url()
eval()
function()
expression()
Default Allowed CSS Functions
The following CSS functions are allowed by default:
rgb()
rgba()
hsl()
hsla()
calc()
var()
linear-gradient()
radial-gradient()
URL Restrictions
URLs within CSS (url() function) are disallowed.
Last updated
Was this helpful?