Extend content types with new fields
In the next exercise, we’ll add a link field to one content type.
Below are the modules in GovCMS that provide custom content type fields. These may include validation, formatting and uploading widgets.
There are many different ways to extend content types by adding extra fields. One example is Link, which lets you enter in HTTP addresses. In this exercise we’ll add a new link field to the Job Posting content type. The link will go to “More information” on another website.
  1. 1.
    Add the link field
    1. 1.
      Go to Structure → Content types → Job posting and click on the Manage fields tab.
    2. 2.
      Add a new field and use the following settings:
    3. 3.
      Click Save and continue. This will take you to the Field settings page. There are no changes so just click Save settings. This takes you to the settings for this field on the Job posting content type.
Test it
Change the field settings to make link title required field You can also make the link title field a required field. Follow the instructions below:
    1. 1.
      Go back to the Manage Fields page of the Job Posting content type
    2. 2.
      Edit the Link field
    3. 3.
      Change the Allow link text to “Required”
    4. 4.
      Save settings.
Re-test it
    1. 1.
      Update your Job posting content page from the previous example and enter the link title.
    2. 2.
      Compare the look of the content page
Export as PDF
Copy link