Skip to main content

Configuring section custom fields

Use the Fields page in Site Service to create custom fields for your website sections. Custom fields allow you to augment the ANS of your Site Service sections, and by extension the ANS of content circulated to those sections.

You can define custom fields by configuring properties that together define the data types, values, and presentation of a field. Then you attach the field to a section's create and edit form, see ???. When you next create a new section or edit a section with the field included, the field's values will be included in the ANS that is saved for the section. The ANS of stories, galleries, and videos that are circulated to the section contains the custom field's value.

Commonly used custom fields include:

  • Menu Title - the section name that you want to appear in your site navigation.

  • PageBuilder Path for Native Apps - a relative path from which native apps pull data when rendering.

  • Section About - an end user-facing description for use in the "about" page of the site.

  • Description - the website SEO description for use in the HTML metadata and og tags.

  • Keywords - SEO keywords for use in the HTML "keywords" metadata.

  • Tagline - a tagline for use in the site's page topper.

  • Title - a title for your site, for use in the HTML metadata.

  • Section URL - your site’s URL with a trailing slash, for use as a link from the site title and logo.

  • Section Logo Image - an image URL to be used when the section's page assets are rendered.

  • Facebook - the URL for your Facebook page.

  • Instagram - the URL for your Instagram page.

  • RSS - the URL for your RSS feed.

  • Twitter - the URL for your X, or Twitter, page.

Field types

Choosing the correct field type when you create a custom field is important because we recommend avoiding changing the field type later. Review the following field types and choose the most appropriate type for your field.

Field Type 

Description 

Text

A text field that provides users with a free text entry field.

URL

A text field that provides users with a free text entry field.

Static

A text field that provides users with a free text entry field.

Slug

A text field that provides users with a free text entry field.

Image

A text field that provides users with a free text entry field.

List

A list field that lets users enter an array of strings and add additional entries, as needed.

Map (key/pair values)

A mapping field that lets users create an object with unique keys. This field type can be difficult to filter in PageBuilder Engine because you can set key-value to anything.

Select

A drop-down menu field that lets users select pre-defined options.

Boolean

A radio button field that lets users select from a Boolean-string value.

An administrator of a news organization wants to store the Sports editorial section's social media URLs so that these URLs are part of the ANS of all content that is circulated or published to the Sports section.

The administrator opens the Site Service Fields page and creates custom fields for each item of social media:

  • The administrator selects URL as the Field type of each custom field so that only URL data will be accepted.

  • The administrator gives each custom field the value "social" for the Field group name, ensuring that all of these fields are arranged under the same group heading when they are shown on a Create section page or Edit section page.

  • The administrator selects the Default field checkbox for each field, ensuring that the Create new section page shows the fields when opened.

  • The administrator decides not to select the Required checkbox for the fields, to allow a section containing the fields to be saved without data.

After creating the social media custom fields, the administrator navigates to the Sports section in Site Service, opens its Edit section page and adds each social media custom field before saving the section.

Procedures

When you create new fields, both the field group and the field slug are relevant for the resulting ANS that the system adds to sections. Keep this in mind when naming your fields.

The custom fields are available on the Create new section and Editing section pages. See ???

  1. Navigate to the Site Service app. The Websites page opens.

  2. Click the Fields tab. The Fields page opens.

  3. Click New field, or click Edit next to an existing field. The Create a new field or Edit field panel opens.

  4. Complete, update, or review the following fields:

    • Field label - enter a name for the field.

    • Field slug - automatically populates with an uneditable slug version of the field label value.

    • Field type - select the type of field you want to create; see Field Types. A field type change can result in value loss when you open a section that uses the custom field, so we recommend to not change the type after you create the field.

    • Field default value - optionally, enter a default value. Fill in if a particular value is most likely to be used. When you add the field to a Section through the Add Field action, this value populates the field by default. See ???

    • Field group - enter a field group name. This value is displayed on the section form as a title box around the custom field. Different custom fields can be part of the same field group. We strongly suggest that you not change the field group name after the field is used.

      We do not recommend using group names with spaces. Use an underscore in the field group name instead of a space. On the section form, field group names with underscores display a space in place of an underscore.

      Warning

      When it is in use within a section, if the field group name is updated, the rename risks breaking developer programming that relies on the specific name of the field group.

    • Field help text - enter a brief description that appears as help text on the section form to help your users know how to use the field.

    • Default field - select to add this field to every instance of the Create a new section or Edit section page. Selecting this check box forces the field to be added in each form, and it cannot be removed.

    • Required field - select to require users to complete this field on the Create a new section or Edit section page before saving.

  5. Click Save

Note

When you save a custom field, changes do not automatically update across sections already using the custom field. You must perform a save action on each section; afterwards, the updated section's fields reflect custom field changes.

You can delete custom fields you no longer need. Ensure that your code is updated before deleting fields

  1. Navigate to the Site Service app. The Websites page opens.

  2. Click the Fields tab. The Fields page opens.

  3. Click Delete next to the field you want to remove.

Note

A deleted custom field is not automatically removed from sections that use the custom field. You must perform a save action on each section using the field to remove it completely.