Portal definitions and components
How Servicely chooses the portal a user sees, what a portal definition controls, and how portal components and pages are built.
A portal definition is the record that decides what the Service Portal looks like and holds for a set of users: its home page, styling, catalog categories and knowledge bases. This page explains how definitions and components work, for administrators planning more than one portal.
What a portal definition holds
Portal definitions are listed under Administration → Portal → Portal definitions. The Portal application ships one definition, Default, described as the definition used when no other applies.
| Part of the definition | What it controls |
|---|---|
| Name, Key, Description | Identify the definition. |
| Active | Only active definitions are considered. |
| Default | Marks the fallback definition. |
| Order | Decides which definition wins when several apply. The lowest order wins. |
| Roles, Groups, EntitlementScript | Decide who the definition applies to. |
| Admin eligible | Marks a definition administrators can land on, when the instance opts in. |
| Home page | The portal page shown first. |
| Base style, CSS, logo, background image | The portal’s look. |
| Colour fields | Primary, secondary, info, success, warning and danger colours, plus text, link, menu, header, page, panel and table colours. |
| Catalog categories | Limits the catalog categories shown. When empty, every category the user can see is shown. |
| Knowledge bases | Limits the knowledge bases shown. When empty, every knowledge base the user can see is shown. |
How the portal for a user is chosen
Servicely picks one effective definition each time the portal loads.
| Who is signed in | Definition used |
|---|---|
| Nobody | The definition marked Default. |
| An administrator | The Default definition. If the application property portal.admin.landing.use_eligible_flag is true, the lowest-order definition marked Admin eligible is used instead, falling back to Default. |
| Any other user | The lowest-order active definition that applies to the user. If none applies, the user’s saved definition, then Default. |
A definition applies to a user when every condition it sets is met:
- if it lists Groups, the user is a member of one of them
- if it lists Roles, the user has one of them
- if it has an entitlement script, the script does not return false
Administrators hold every role, so role-limited definitions would otherwise match them first. That is why administrators get Default unless the instance opts in to Admin eligible.
Components and pages
A portal page is a kind of dashboard laid out from portal components. Pages are listed under Administration → Portal → Portal pages, components under Portal components and shared styles under Portal styles.
A portal component is a reusable block, such as the announcements component.
| Part of the component | What it is |
|---|---|
| Name, Key, Description | Identify the component. |
| Category | Basic, Advanced, Page, Layout, Data, Chart or Other. |
| Template, Styles, Component | The markup, styles and client code that render it. |
| Server script | Code that runs on the server and supplies the component’s data. |
| Roles, Groups, Entitlement script | Decide who sees the component, using the same rules as definitions. Administrators always see components. |
Modal components are portal components that open in a dialog. One example is CreateFromTemplate, which lists the templates available for a table.