Add dynamic titles to a page
Create variables to generate descriptive titles depending on the content loaded into a page.
始める前に
Role required: admin
このタスクについて
手順
- Navigate to All > Service Portal > Pages.
- Open a page.
-
Add one or more variables to the Dynamic page title
field.
Depending on the available URL parameters and the dynamic title you would like to define, you can add the following types of values:
Value types Description Example value One URL parameter variable Generates a page title using the associated record of one URL parameter. %first_nameMore than one URL parameter variable Generates a page title using the associated records of multiple URL parameters. %first_name %last_nameStatic value and a URL parameter variable Generates a page title using a static value and the associated record of a URL parameter. Employee: %first_nameEnter the variables in the intended syntax of the title. For example, to have an employee's name and title separated by a hyphen, you would enter %first_name - %title. In the page title, this syntax would render as something like "Beth - System Administrator".
- Click the Dynamic page variables related list tab.
- Click New to create a new variable.
-
On the form, fill in the fields.
Associate a field with a URL query parameter. When the value of the query parameter is used to display content, a field from the same record is used to generate the title. You can define the field to generate the title through the Table field field.
Field Description Name Variable to store the value. Must begin with % and cannot contain spaces. This value must match one of the variables defined in the Dynamic page title field. Application Application scope of the page. This value is read-only. Page Page to apply the dynamic variable to. URL query parameter URL parameter to indicate the record that is being displayed. You can enter any string. ヒント:To create a URL parameter that is meaningful and easily identifiable, use a field name from the record. For example, to refer to a knowledge article, you can enter number to reference the article by its number.Relevant table column Table field to match the URL query parameter. For example, if you entered number to reference a knowledge article by its number, select Number. If left blank, the system uses the record sys_id. Table The source table of the URL query parameter record. Table field Field from the table defined in the Table field. This field is used to generate the dynamic page title. If more than one dynamic page variables match a variable defined in the Dynamic page title field, the record with the latest Updated date is used.
Variables with same name aren't supported and won't be created multiple times. Each variable should be unique.
In this example, the value of the Title field in the User [sys_user] table populates the page title. The
%titlevariable must also be defined in the Dynamic page title field in the page record. - Click Submit.