Custom objects
Define entirely new content types specific to your organisation, with their own fields and their own admin area
A custom object is a new content type you define. Where a custom attribute adds an extra field to an existing content type, a custom object creates a new kind of record with its own fields and its own admin area.
Custom objects are useful when:
- You need a record with multiple fields that stands on its own.
- The same record is referenced from many places — events, posts, pages — and managing it centrally avoids duplication.
- You want to build a list, picker, or smart collection over these records.
Defining a custom object
Open the Custom objects area of Basker. Define a new object. Each object has:
- A label — the human-readable name (singular and plural).
- A handle — used internally to identify the object, in URLs, smart collection filters, and theme code.
- An optional icon to identify the object in the admin.
- An optional description explaining what the object is for.
- A list of fields — the structure of each instance.
Field types are the same as for custom attributes: text, number, date, media, file, select, radio, checkbox, relationship, rich text.
Examples
A few examples to make the idea concrete:
- Sponsor — fields for name, logo, tier, link, and description. Each sponsor is one instance; events reference sponsors by relationship.
- Discount code — fields for code, percentage off, valid-from date, valid-until date, terms.
- Accessibility service — fields for service name, description, providing partner, and the events it applies to.
- Trustee — fields for name, role, biography, photo, year joined.
You define the structure once; you create as many instances as you need. See Custom object instances.
Where custom objects appear
Once defined, a custom object behaves like a built-in content type:
- It has its own admin list and editor.
- Its instances can be referenced from any field that takes relationships, including custom attributes on other content types.
- Smart collections can target it.
- Themes can render its instances on the live site if they're set up to.
Versus custom attributes
Use a custom attribute when you need to attach extra information to existing content. Use a custom object when the information itself is the content — when it deserves its own list, its own management area, and its own concept.