Modeling services
This page is for website creators and project managers who create the content class for service pages. One class
for all services keeps the pages consistent, makes lists and search predictable, and lets editors fill a form
instead of designing a page. The class editor is described in
Content classes for websites; the datatypes
named are those of kernel/classes/datatypes/ and the eztags extension.
Contents
The attributes
| Attribute | Identifier | Datatype (class editor name) | Required | Translatable |
|---|---|---|---|---|
| Service name | title | Text line (ezstring) | yes | yes |
| In short | summary | Text block (eztext) | yes | yes |
| Who can use it | eligibility | XML block (ezxmltext) | no | yes |
| What you need | requirements | XML block | no | yes |
| What it costs | cost | XML block | no | yes |
| How to apply | how_to_apply | XML block | yes | yes |
| Apply online | online_link | URL (ezurl) | no | yes |
| How long it takes | processing_time | Text line | no | yes |
| What happens next | next_steps | XML block | no | yes |
| Contact | contact | Object relation (ezobjectrelation) | no | no |
| Related documents | documents | Object relations (ezobjectrelationlist) | no | no |
| Topics and life events | tags | Tags (eztags) | no | no (tags have their own translations) |
| Next review | review_date | Date (ezdate) | yes | no |
| Meta data | metadata | Metadata (xrowmetadata) | no | yes |
Object name pattern <title>. The xrowmetadata and eztags datatypes come from extensions that the default
installation activates (Extensions it activates).
Creating the class
- Setup > Classes, group Content, New class.
- Name
Service, identifierservice, object name pattern<title>. - For each attribute: choose the datatype in Add attribute, press Add, fill name and identifier, tick Required and Translatable as in the table, Searchable for text attributes.
- For Contact, set the relation's allowed class to your Contact point class (see Contact points and offices); for Related documents, allow File.
- For Next review, the Date datatype can default to empty; keep it required so editors must set it.
- Press OK. Check: the class appears in the list; create a test service.
Settings worth deciding
| Setting | Recommendation | Why |
|---|---|---|
| Container | no | services do not hold other content; documents are related, not children |
| Default object availability | as your language policy says | "always available" shows the main language where a translation is missing |
| Attribute order | the reading order of the page | the edit form follows it |
| Category (tabs) of attributes | "Content" and "Management" (contact, tags, review) | a shorter first tab for writers |
| Text line Trim the stored value | on for Service name | stray spaces break sorting (Content model and editing, 9) |
Testing the class
- To do: Create a service with only the required fields: it publishes.
- To do: Leave How to apply empty: the form refuses with a message at the field.
- To do: Translate it: dates, tags and relations are shared; texts are per language.
- To do: The full view shows the fields in the right order (see The service page and plain language).
- To do: Search finds the service by a word from In short.
Variations
| Need | Change |
|---|---|
| Fees that change every year in one place | a separate Fee object related from services, edited once |
| Services in several languages with different legal texts | keep legal texts in related File objects per language |
| Services for businesses and for residents | one class; an Audience selection (ezselection) or tags |
| Very simple services | the same class; optional fields left empty, templates hide empty fields |
Move the class to other installations as a package, never by recreating it by hand (Packages).
Related pages
- Building a service catalog
- The service page and plain language
- Choosing datatypes for your fields
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.