Custom attributes
Add extra fields to events, posts, people, and other existing content types
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 fill it in for each event.
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 label — what editors see next to the field in the editor.
- An internal name — used in URLs, smart-collection filters, 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 — 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.
- Relationship — a link to a record from another content type (events, people, venues, organisations, custom objects, and so on).
- Rich text — formatted body content.
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. Set up a "Featured composer" relationship attribute on events that links to people, and each event gains a picker for choosing one composer record.
Filling in a custom attribute
Once added, the attribute appears in the editor for every record of that content type. Fill it in just like any other field. The attribute is searchable, can be used in smart collection conditions, and is exposed to themes for rendering on the live site.
Custom attributes and existing records
Adding a new custom attribute doesn't fill in values for content that already exists. The attribute starts empty on every existing record. Editing an existing record gives you the new field to fill in; you can also bulk-edit through exports if you have many records to update.