Welcome to the OpenCities help centre. Search for what you're after, or browse the categories.
Can't find what you're looking for? Submit a support ticket and we'll be in touch.

Follow

Create Custom Fields

avatar of OpenCities Product Team

OpenCities Product Team

Last updated

This task is for users with the OC Developer role.

All content on your website and CMS starts with fields, which represent individual data elements on each content page. There are many core fields that we have built into the product, and you can also create your own or reuse existing fields for custom development. Each field will also have one or more templates, determining how the field's content is displayed. Content types are made up of fields and have their own templates.

There are numerous types of fields, and you can choose the appropriate type based on how you want to use the field. Each field has different options to configure.

This article will discuss creating your fields and detail the four options that all types have.

Create a New Custom Field

  1. Go to More > Fields. Out-of-the-box fields are listed under System Fields, and you'll find any fields you've already created under Custom Fields.
  2. Select Create New Custom Fields or expand Custom Fields and select New or Create New Custom Fields.
  3. Fill in all the details for your field. There are unique details to provide for each different type of field, but there are four options they have in common: 
    • Name: This is a unique but straightforward name for your field. You cannot use characters unfriendly to URLs, such as ? or &.
    • Description: Use this to provide more information about your field. If you add a Description, content authors will see this instead of the Name for the field's label; they will see the Name if you leave this blank.
    • Search: Check Include in search result text output if you want the field's content to be searched when someone searches your website.
    • Input type: Select the type of field from this drop-down menu. The rest of the options you can configure for the field will change depending on what Input type you choose.
  4. Save when you're done.

create new field.png

Once you've created a field, you'll need to create a template to determine how it displays content, before adding it to a custom content type. 

Additionally, you can use the Links tab to see which content types, templates, or widgets the field in being used on.

What Else?

Was this article helpful?
0 out of 3 found this helpful