Custom attributes
Add extra fields to events, posts, people, and other existing content types
Custom attributes are controlled by your site's plan. See Choosing a Basker plan and the live pricing matrix for current availability.
A custom attribute is an extra field on an existing content type. Add a custom attribute to events, and every event in Basker gains that field. The attribute appears inside the event's editor alongside the built-in fields, and you can enter it for each event.
You can add custom attributes to events, event instances, posts, seasons, series, works, venues, organizations, and people.
Adding a custom attribute
Open the Custom attributes area of Basker. For the content type you want to extend, add a new attribute. Each attribute has:
- A name: what editors see next to the field in the editor.
- A namespace and key: a stable identifier, written like
custom.run_time, used in smart collection conditions, the public API, and theme code. - An optional description to explain the field's purpose.
- An optional tab: which tab of the editor the field appears under (so you can group related custom attributes).
- A type.
Available types
Custom attributes support a wide range of types, mirroring Basker's built-in fields:
- Text: single-line text.
- Textarea: multi-line plain text.
- Number, Integer, and Decimal: numeric values.
- Date and Date and time.
- Media upload: an image from your media library.
- File upload: a file from your files area.
- Select: pick one from a list of options you define.
- Radio: same as select, displayed as radio buttons.
- Checkbox: a true/false toggle.
- Content relationships: links to events, event instances, people, seasons, series, works, venues, organizations, pages, posts, blogs, or custom object instances.
- Rich text: formatted body content.
- Email, Colour, and JSON for more specialized values.
For select and radio types, you also define the list of options the field accepts.
For relationship types, you choose which content type the field links to. For example, create a "Featured composer" relationship attribute on events that links to people. Each event then gains a picker for choosing one composer.
Relationship, media, and file attributes also have a Public API response setting. It controls how much related data appears when the attribute is returned through the FrontStage API:
| Option | API response |
|---|---|
| Full record | Returns the expanded related record when the endpoint expands linked content. |
| Summary | Returns a compact object with identifying fields such as title, name, label, slug, or URL. |
| Reference only | Returns only the related record ID, or an array of IDs for fields that allow multiple values. |
An attribute can also hold nested fields (group several related fields together, or let editors add a repeating set of fields), so you can build grouped or structured data instead of a single value. Nesting is limited to three levels.
Entering a custom attribute
Once added, the attribute appears in the editor for every item of that content type. Enter it just like any other field. The attribute is searchable. You can use it in smart collection conditions, and themes can render it on the live site.
Custom attributes on existing content
Adding a new custom attribute does not add values to content that already exists. The attribute starts empty on every existing item. Editing an existing item gives you the new field to complete. For events, event instances, and seasons, you can also export the list, complete the new column, and import it back to update many at once.