Front-end & Twig
Pigeon exposes a craft.pigeon Twig variable for logged-in users, ships ready-to-use front-end routes, and lets you restyle everything.
The craft.pigeon variable
| Call | Returns |
|---|---|
craft.pigeon.threads(type) | The current user’s threads, newest activity first. Optional type ('support' / 'direct'). |
craft.pigeon.thread(id) | A single thread the current user participates in (or null). |
craft.pigeon.unreadCount() | Number of threads with unread messages for the current user. |
craft.pigeon.isUnread(id) | Whether a thread is unread for the current user. |
craft.pigeon.messages(id) | Visible messages for a thread (internal notes excluded). |
Messages
{% if craft.pigeon.unreadCount() %}
{{ craft.pigeon.unreadCount() }}
{% endif %}
{% for thread in craft.pigeon.threads() %}
{{ thread.title }}
{% if craft.pigeon.isUnread(thread.id) %}new{% endif %}
{% endfor %}
Built-in routes
| Route | Who | Purpose |
|---|---|---|
/pigeon/threads | Logged-in user | List your threads & start one |
/pigeon/threads/<id> | Logged-in user | View & reply |
/pigeon/t/<token> | Guest | View & reply via an emailed link |
These render self-contained example templates that ship with the plugin, so they work out of the box on a fresh install.
Overriding templates
Pigeon registers its templates/ directory under the pigeon/ prefix for both the control panel and the front end. The front-end examples live under pigeon/_front/… (for example pigeon/_front/thread and pigeon/_front/guest). To fully customise the experience, copy those templates into your own project, restyle them, and point your own routes/controllers at them — every form simply posts to the action endpoints.