Jobs
A job is a Craft element. It has a field layout for the advert itself, per-site URI formats and templates, drafts and revisions, element search, relations, the trash and permissions — Craft's own, not a second implementation of each.
What is a column and what is a field
Hire draws one line and most of the design follows from it.
- Columns are the things Hire has to reason about: the closing date, the number of openings, the salary, the apply method, which form takes the applications, the workplace type and the address. They drive queries, statuses, the listing and the structured data.
- Fields are yours. The description, requirements, benefits, a photograph of the office — put them in the job field layout under Hire → Settings → Job fields. Hire has no opinion about them.
Statuses
| Status | Means |
|---|---|
| Open | Published, live, taking applications |
| Scheduled | Enabled, with a post date in the future |
| Closed | Past its closing date, or every opening is filled. Still a real page |
| Disabled | Switched off |
Closing date and "fully staffed" are evaluated when the job is read as well as by the nightly
sweep, so a job whose closing date passed an hour ago stops taking applications even on a site
whose cron is broken. The sweep runs from Craft's garbage collection while Close jobs when their closing date passes
is on (Settings → General); php craft hire/jobs/expire runs it on your own schedule.
Openings
openings is how many people the job hires. Moving an application to a stage of type hired
moves the job's filled count by itself, and once every opening is filled the job closes. Set it to
0 for a job that never fills.
How to apply
Each job takes applications one of four ways:
- Form — the built-in application form, and the job chooses which one
- URL — an external application page
- Email — a
mailto:link with the job title in the subject - None — the job is an advert only
job.applyUrl returns the right link for the URL and email methods.
Salary
A band — minimum, maximum, currency and period (hour, day, week, month or year) — plus a separate
publish it flag, so an employer can record a range internally and still say nothing publicly.
A note on its own ("Competitive") is shown when there are no figures. The currency defaults to the
one in settings, and {{ job.salary }} prints nothing at all when the salary is unpublished.
Location
The address is a craft\elements\Address, so the fields are country-aware and formatted the
Craft way, and the structured data gets its parts without re-parsing a text field. The workplace
type is on-site, hybrid or remote. job.locationLabel is the short version for a
listing row.
The job reference
Every job gets a short reference such as JOB-104, derived from its element ID, so it is stable
and needs no counter. Change the prefix under Settings → General.
Per-site settings
Under Settings → Job URLs, each site has its own URI format, template, and whether new jobs are enabled there by default. Jobs are localized, so their titles and fields can be translated per site.
In templates
{{ job.title }}
{{ job.code }} {# JOB-104 #}
{{ job.locationLabel }}
{{ job.salary }}
{{ job.expiryDate|date('j F Y') }}
{{ job.openingsRemaining }}
{% if job.isAcceptingApplications %}…{% endif %}