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

CallReturns
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).

Built-in routes

RouteWhoPurpose
/pigeon/threadsLogged-in userList your threads & start one
/pigeon/threads/<id>Logged-in userView & reply
/pigeon/t/<token>GuestView & 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.