Group Fields within Global Fields

You can add Group fields within a Global field while creating a Global field’s schema. This allows you to reuse repetitive Group field structure across several content types instead of creating them every time.

Let’s consider an example to understand how we can place Group fields within Global fields.

Consider a scenario where a specific banner or advertisement needs to appear on every webpage of your healthcare website. Along with the banner, you also need to display helpful links related to the current webpage.

To achieve this, you need to create a Global field named “Advertisements and More”. Within this Global field, add a Group field named “Banner”. Then, within the Group field, add a Single Line Textbox field (for the Banner Title), a Rich Text Editor field (for the Description), and a File field (for the Banner Image), and Link field (for helpful links to related content).

Once done with creation of the Global field, you can create content types for each health related article on your healthcare site. Now, you can refer to the “Advertisements and More” Global field within any content type to consistently display the banner details and helpful links across every webpage of your site.

Let us look at how developers can work with Group fields and Global fields.

Add the Group Field to Global Fields

To add a Group field to the Global field, a developer can perform the following steps:

  1. After opening your stack, go to Content > Global Fields.
  2. Click on the + New Global Field button to create a new Global field. Provide a suitable Name and Description to your Global field.
  3. Click on Create and Add fields.
  4. Click on the Group field option and drag and drop the field from the Fields list displayed at the left-hand side. Provide a suitable name for your Group field (for e.g. Banner).
  5. Now, from the left panel, add fields of your choice into this Group field (for e.g. a Single Line Textbox field for the banner title or a Rich Text Editor field for the banner description).
  6. Once done with adding fields within the Global field, click on either Save or Save and Close.
  7. Now, go to the Content Type Builder page of any content type, drag and drop the Global field from the left-hand side pane, and select the Global field you just created (for e.g. Advertisements and More) from the Select Global Field dropdown menu.Group_Field_within_Global_Fields.png

    Note: When you add a Group field to your Global field, each Group field counts as a single level of nesting.

You will notice that the entire set of subfields within the Global field automatically load onto the Content Type Builder page.

On This Page

top-arrow