Skip to main content

Member Portal Template Reference

Everything a Member Portal template may rely on. Read this next to the theme authoring guide, which explains how a theme is put together; this file is the reference for what is inside a template.

Templates are Twig 3. They are rendered with autoescape: 'html' β€” every variable you print is escaped for you β€” and with strict_variables: false, so reading a variable that does not exist yields nothing rather than an error.

Where templates are resolved from​

The loader looks in two places, in order:

  1. Include/themes/<active theme>/templates/
  2. Include/themes/default/templates/

The first hit wins, so a theme file replaces the core file at the same relative path. The namespace @default always addresses the second list, which is how an override extends the very template it replaces:

{% extends "@default/home.html.twig" %}

The page shell​

Every page extends layout.html.twig, which a theme may also override.

Blocks​

BlockWhat goes in itFilled by default
head_extraExtra <link> / <meta> / <style> for this pageempty
headerThe church identity barpartials/header.html.twig
navThe portal navigationpartials/nav.html.twig
heroA full-width band under the navigationempty
contentThe page itself. Every page template fills this.empty
sidebarAn optional column beside the contentempty
footerThe church contact line and the church's social linkspartials/footer.html.twig
scripts_extraExtra <script> for this page β€” with nonce="{{ nonce() }}"empty

Partials​

Each is a separate file, so a theme can replace one without touching the others:

PartialRenders
partials/header.html.twigChurch logo and name, and the account menu ("Hello <first name>" β†’ Email History; Sign-in and devices while the member holds portal.devices.manage; Change Password in a staff session; Admin Console when member.adminConsoleUrl is set; Sign out). Signed out, there is no menu: a page that sets guestPage offers Sign in and/or Register your family links instead (see The signed-out pages)
partials/nav.html.twigThe nav entries, and the toggle target #portal-nav
partials/footer.html.twigChurch contact details on the leading edge, church.socialLinks as icon links on the trailing edge
partials/flash.html.twigThe fixed notice container, holding this request's flash messages. A theme that overrides layout.html.twig must keep this include β€” without it there is no container, and every message the portal raises goes unseen.
partials/login-as-person-banner.html.twigWhile an administrator uses Login as Person (portal.loginAsPerson): who they are seeing the portal as, whether changes are allowed, and Stop, their only way back. Keep the include in an overridden layout; if a page lacks it, the portal inserts the system theme's banner right after <body>
partials/passkey-offer.html.twigThe one-time "Use a passkey on this device?" card, included above content while portal.passkeyOffer is true
login/remember-device.html.twigThe "This is my own device. Keep me signed in." box on the code and link pages, drawn only while offerRememberDevice is true. Never pre-tick it

What the layout already loads​

The layout supplies all of this; load nothing a second time:

  • ChurchCRM's core CSS and JS bundle (Tabler, Bootstrap 5, jQuery), the RTL variant when the locale is right-to-left
  • moment
  • portal.min.css, then the active theme's theme.css when it has one
  • bootbox (confirmations and prompts), i18next and the locale loader, then portal.min.js, then the active theme's theme.js when it has one
  • whatever <head> and footer HTML the enabled plugins inject

portal.min.js also publishes window.CRM.portalToast(message, type) β€” type being success, warning, danger or info (the default). Call it from a theme's theme.js to show a message the way the portal shows all of them: a toast in the fixed top-right stack that fades away on its own.

Page IDs and classes worth knowing​

SelectorWhat it is
.portal-body<body>
.portal-shellThe column that holds header, nav, main and footer
.portal-containerThe width-limited wrapper used by every band
#portal-nav / #portal-nav-toggleThe navigation and the button that opens it on a phone
#portal-account / #portal-account-toggle / #portal-account-menuThe header's account menu: its wrapper, the "Hello <first name>" button and the role="menu" dropdown. portal.min.js binds to these ids, so a theme that overrides partials/header.html.twig must keep them
#portal-mainThe <main> element
.portal-cardThe standard content card
.portal-subnavA page's own secondary tab bar, e.g. the two volunteering pages
.portal-page-titleThe <h1> at the top of a page's content
.portal-detail-listA <dl> of label/value pairs β€” one column on a phone, two from the tablet breakpoint up
.portal-card-detailsThe same <dl> inside a card: one column at every width, because a card is a column and a long email address has nowhere to wrap
.portal-contact-list / .portal-contact-itemThe church office's contact lines on family/none.html.twig β€” an icon and a mailto: or tel: link
.portal-form / .portal-field / .portal-inputA portal form, one of its fields, and the control inside it
.portal-field-errorThe inline message for a field; it is hidden while empty
.portal-button / .portal-button-quietThe primary and secondary action buttons
.portal-avatar / .portal-avatar-initialsA member's photo, and the initials shown when there is none
.portal-member-list / .portal-memberThe family members list; the member's own row also carries .is-self
.portal-member-badge / .portal-member-badge-pendingThe "You" badge on a member row, and the "Waiting for review" badge on a proposed member
.portal-dialogA <dialog> in the portal's own chrome
.portal-breadcrumbThe single "← back" link above a nested page's title (My Teams)
.portal-team-card / .portal-team-ministryOne team on My Teams, and the ministry line under a team's name
.portal-signin / .portal-signin-welcomeThe column that holds a sign-in page's card, and the welcome heading above it
.portal-header-guest / .portal-header-linkThe signed-out header's Sign in / Register your family links
.portal-registerThe family registration page
.portal-directory-entryOne family or person on Directory
#login-as-person-bannerThe Login as Person banner
#portal-toasts / .portal-flashThe fixed notice container, and one notice in it. position: fixed, so a notice never moves the page; see theme authoring guide for its colour tokens

Hooks the page bundles look for​

The page bundles bind to these ids and attributes, so a theme that overrides one of those pages must keep them if it wants the page to work:

IdOn
portal-profile-form, portal-profile-saveprofile/edit.html.twig
portal-photo-input, portal-photo-preview, portal-photo-errorprofile/edit.html.twig
portal-family-form, portal-family-savefamily/edit.html.twig
portal-confirm-form, portal-confirm-submit, portal-confirm-comment, portal-confirm-comment-fieldfamily/confirm.html.twig
portal-add-member-dialog, portal-add-member-form, portal-add-member-open, portal-add-member-submit, portal-add-member-cancelfamily/index.html.twig
portal-team, portal-team-tabs, nav-item-positions / -volunteers / -schedules / -occurrencesteams/team.html.twig
portalSignInForm, portalSignInEmail; with passkeys [data-passkey-sign-in], portalPasskeySignInButton, [data-passkey-error] and the hidden portalPasskeyFormlogin/request.html.twig (portal-passkeys.min.js)
[data-passkey-add] holding [data-passkey-create] and [data-passkey-error], plus a csrf_field()devices/index.html.twig and partials/passkey-offer.html.twig; the offer also carries [data-passkey-offer] and [data-passkey-dismiss]
[data-directory-browse], [data-directory-entry], [data-directory-heading], [data-directory-letter], portal-directory-search, portal-directory-no-matchdirectory/index.html.twig (portal-directory.min.js)
registration-stepper, registration-form, the step-* panels, member-card-template with its member-* classes, members-container, the displayFamily* ids and registration-successregister/index.html.twig (FamilyRegister.js, which posts to the public registration API)

A field's inline message is the element with data-error-for="<field name>" inside the form; a read-only value the bundle refreshes after a save is the element with data-field="<field name>". Any form marked data-submit-once locks its submit button after the first press and shows the button's data-busy-label, as the sign-in form does with "Sending…".


Functions​

These, and only these, are callable from a portal template. There is no PHP, no filesystem access, no database access and no session.

FunctionReturns
url(path)A path inside this installation, with the install's root path in front: url('/portal/profile')
asset(path)A core ChurchCRM asset URL, cache-busted: asset('/skin/v2/portal.min.js')
theme_asset(path)A file from the active theme, cache-busted: theme_asset('images/hero.jpg'). If the active theme does not carry the file but the system theme does, you get the system theme's copy.
csrf_field()The hidden input every portal form must contain. Safe HTML β€” do not escape it.
nonce()This request's Content-Security-Policy nonce. Every inline <script> needs nonce="{{ nonce() }}".
portal_can(capability, scope)Whether the member holds a portal capability, such as portal.family.contacts.view, to show or hide a section or button. scope is optional: the record the template has (a family, a team) or its id. Without it, holding the capability anywhere is enough. The routes check again for themselves, so hiding a button is never the only guard.
gettext(text)The translation of text
ngettext(singular, plural, count)The translation of singular/plural for count
email_wrap (filter)An email address, escaped, that may wrap after the @ and before each . instead of mid-word: {{ profile.email|email_wrap }}. Safe HTML β€” do not escape it again.

Globals​

Available in every template, including yours.

church​

The church's identity, from Admin β†’ Church Information.

FieldTypeNotes
namestringMay be empty on a brand-new install
address, city, state, zipstring
phone, emailstring
websitestring
logoUrlstringThe uploaded church logo, or ChurchCRM's stock image when none is set
logoOnDarkUrlstringThe same church logo, but when none is set ChurchCRM's light-on-dark mark instead of the stock image. The default header, which is dark, uses this one
socialLinkslistThe church's social accounts, already filtered to the ones that are set and ordered X, YouTube, Facebook, Instagram. Each entry is {id, label, url, icon} β€” icon is a Font Awesome Free brand class such as fa-brands fa-facebook. Empty when the church has configured none, so {% if church.socialLinks is not empty %} is the whole guard you need.

member​

The person the portal is acting for: the signed-in member, or during Login as Person the person the administrator is seeing it as. No template, and no portal route, ever addresses somebody else. On the signed-out pages id is 0 and every other field is empty.

FieldTypeNotes
idintThe person id
firstName, lastNamestring
fullNamestringFormatted per the installation's name format
familyNamestringThe family's surname; empty when the person has no family
emailstring
avatarUrlstring/api/portal/me/photo, cache-busted; empty when no photo has been uploaded β€” render initials instead
familyIdint0 when the person has no family
isTeamLeaderbooltrue when this person leads at least one volunteer team. Kept for older themes; portal_can('volunteer.team.manage') asks the same
isStaffbooltrue in a staff session: the portal was opened from a staff sign-in
signedInWithPasswordbooltrue in a staff session, which is the only kind with a password; the account menu offers Change Password only then
adminConsoleUrlstringWhere the account menu's Admin Console goes: back to the staff side from a staff session, or to the staff sign-in from a member session whose person also has a staff account. Empty otherwise, and during Login as Person

An ordered list of entries. Render all of them; the list is already filtered to what this member may see.

FieldTypeNotes
idstringStable identifier, e.g. home
labelstringAlready translated
urlstringReady to use in href
iconstringA Font Awesome class, e.g. fa-solid fa-house
activebooltrue for the page being rendered
badgestringA short count or flag; empty when there is nothing to show

flash​

One-shot messages queued by the previous request. Reading them empties the list, so a reload never repeats them.

FieldTypeNotes
typestringinfo, success, warning or danger
messagestringAlready translated

portal​

Facts about this request and this installation.

FieldTypeNotes
rootPathstringThe install's root path β€” '' at a domain root, /churchcrm in a subdirectory
themeNamestringThe active theme's folder name
localestringe.g. en_US
isRTLboolRight-to-left locale
colorModestringauto, light or dark. Always auto (follow the device) for a member; a staff session gets the staff account's choice
developerModebooltrue when the template cache is off
showCalendarboolWhether the calendar is there for this member: at least one calendar is shared
showVolunteerboolWhether the volunteering pages are there for this member
allowBirthdayEditboolWhether members may change birthdays
passkeyOfferboolWhether this page shows the one-time passkey offer. Reading it spends it, as with flash
loginAsPersonobjectDuring Login as Person: {personName, actorName, allowsChanges, stopUrl}; null otherwise
hasThemeCssboolWhether a theme.css is available to link
hasThemeJsboolWhether a theme.js is available to load
pluginHeadHTMLThe <head> content enabled plugins inject β€” print it verbatim
pluginFooterHTMLThe footer content enabled plugins inject β€” print it verbatim
bootstrapJsonJSONThe window.CRM seed the core bundles expect
localeConfigJsonJSONThe argument for window.CRM.loadLocaleFiles(…)

The last four are pre-rendered fragments the layout emits as-is. Print them without |escape and without |raw β€” they are already marked safe. If you override layout.html.twig, keep emitting all four, or plugins and translations will stop working on your pages.


Page templates​

TemplateRendered forIts own variables
home.html.twigGET /portalpageTitle, upcomingEvents, hasVisibleCalendars, showVolunteering, familySummary, profile
calendar/index.html.twigGET /portal/calendarpageTitle, calendars, hasCalendars, calendarConfigJson
volunteer/schedule.html.twigGET /portal/volunteer/schedulepageTitle, activeTab
volunteer/opportunities.html.twigGET /portal/volunteer/opportunitiespageTitle, activeTab
volunteer/partials/tabs.html.twigincluded by both volunteering pagesactiveTab
profile/index.html.twigGET /portal/profilepageTitle, profile
profile/edit.html.twigGET /portal/profile/editpageTitle, profile, languages
profile/password.html.twigGET/POST /portal/profile/password, in a staff session onlypageTitle, formAction, minPasswordLength, oldPasswordError, newPasswordError
profile/password-changed.html.twigThe same route, after a successful changepageTitle
profile/two-factor.html.twigGET /portal/profile/two-factor, in a staff session onlypageTitle
devices/index.html.twigGET /portal/devices (Sign-in and devices)pageTitle, devices, offerRememberDevice, passkeysOn, passkeys, passkeyAddProblem, emailToConfirm
family/index.html.twigGET /portal/familypageTitle, family, members, canEdit, canConfirm, canSeeContacts, familyRoles, defaultNewMemberRoleId
family/edit.html.twigGET /portal/family/editpageTitle, family, members, canEdit, canConfirm, canSeeContacts, countries
family/confirm.html.twigGET /portal/family/confirmpageTitle, family, members, canEdit, canConfirm, canSeeContacts
directory/index.html.twigGET /portal/directorypageTitle, groups, entryCount, browse, query, truncated, searchMinLength, searchLimit
giving/index.html.twigGET /portal/giving (My Giving)pageTitle, year, isHousehold, years
teams/index.html.twigGET /portal/teamspageTitle, teams
teams/team.html.twigGET /portal/teams/{teamId}pageTitle, team
teams/occurrence.html.twigGET /portal/teams/{teamId}/occurrences/{occurrenceId}pageTitle, team, occurrence, headcount
family/none.html.twigAll three family URLs, and GET /portal/giving/statement, for a member with no familypageTitle, officeEmail, officePhone, officePhoneHref
email/index.html.twigGET /portal/email-historypageTitle, emails, page, pages, total, previousUrl, nextUrl
email/show.html.twigGET /portal/email-history/{id}pageTitle, email, body, hasBody
login/request.html.twigGET/POST /portal/login, while member sign-in is onpageTitle, email, emailError, passkeySignIn, plus the sign-in page variables
login/code.html.twigGET/POST /portal/login/code: the answer to every email requestpageTitle, codeError, plus the sign-in page variables
login/confirm.html.twigGET /portal/login/confirm/{token}: the page an emailed link openspageTitle, firstName, churchName, confirmUrl, plus the sign-in page variables
login/link-expired.html.twigA link that is unknown, expired, used or replacedpageTitle, loginUrl
login/failed.html.twigA code, link or passkey that signed nobody inpageTitle, loginUrl, passkey
login/unavailable.html.twigEvery /portal/login page while member sign-in is off and self-registration is onpageTitle, guestPage, selfRegistrationEnabled, memberSignInEnabled
register/index.html.twigGET /portal/register, while self-registration is onpageTitle, guestPage, memberSignInEnabled, selfRegistrationEnabled, familyRoles, phoneFormat, phoneFormatCell, defaults
email-change/confirm.html.twigGET/POST /portal/email/confirm/{token}: the link in an email-change messagepageTitle, state, kind, email, firstName, churchName, token
errors/403.html.twigA page this member may not openpageTitle
errors/404.html.twigAn unknown portal URL (and 405)pageTitle
errors/500.html.twigAn unexpected failurepageTitle
errors/unavailable.html.twigShown to members when the active theme fails to rendernone
errors/theme-error.html.twigShown to administrators when the active theme fails to renderthemeName, file, line, message

pageTitle is the page's own title; the layout puts the church's name after it.

formAction on profile/password.html.twig is the URL that page's form posts back to. An override must post to formAction, not to a hard-coded path.

languages on profile/edit.html.twig is {selected, churchName, choices}: the member's choice ('' for the church default), the name of the church's own language, and {locale, name} for each language ChurchCRM ships. It is null in a staff session, which uses the staff account's language, so leave the field out then. The select is named language; the page reloads after a change so the new language shows at once.

profile​

The signed-in member's own person record, as GET /api/portal/me returns it.

FieldTypeNotes
idintThe person id
title, firstName, middleName, lastName, suffixstring
email, workEmailstringemail is the address on record, which is also the sign-in address
pendingEmailstringA new address the member asked for and has not confirmed with the emailed link yet; empty otherwise
emailLockedbooltrue when only an administrator may change this person's email (they have a staff account or portal permissions); the form shows the field read-only
languagestringThe member's own portal language, e.g. de_DE; empty for the church default
homePhone, cellPhone, workPhonestring
birthdaystringISO YYYY-MM-DD, empty when unknown
fullNamestringFormatted per the installation's name format
familyRolestringe.g. Spouse; Unassigned when the person has no role
familyIdint0 when the person has no family
familyNamestringThe family's surname
photoUrlstring/api/portal/me/photo, cache-busted; empty when no photo has been uploaded β€” render initials instead
hasPhotoboolWhether a photo has been uploaded
canEditBirthdayboolMirrors bPortalAllowBirthdayEdit; when false the birthday is neither shown nor accepted

family​

The member's own family. Never another family: the routes take no family id.

FieldTypeNotes
idint
namestringThe family's surname
address1, address2, city, state, zip, countrystring
homePhonestringA family has no email of its own; each person's is on their own record
weddingDatestringISO YYYY-MM-DD, empty when unset

members​

Everyone in the member's family, adults first, as Family::getPeopleSorted() orders them.

FieldTypeNotes
idint
fullNamestring
rolestringThe family-role name
email, cellPhonestringEmpty for everyone but the member's own row unless canSeeContacts is true
photoUrlstring/api/portal/family/members/{id}/photo (or /api/portal/me/photo for the member's own row), cache-busted; empty when that member has no photo
initialsstringThe two-letter stand-in for a missing photo
isSelfbooltrue for the signed-in member's own row
isAdultbooltrue for an adult of the family: a head or spouse (the roles sDirRoleHead and sDirRoleSpouse name) aged 18 or over, or with no birth year; someone proposed in the portal only once approved
awaitingReviewbooltrue for someone a member proposed with "Add a family member" whom staff have not approved yet (People β†’ Self Registrations)

canEdit, canConfirm, canSeeContacts, countries, familyRoles, familySummary​

VariableTypeNotes
canEditboolWhether this member may change the family's details and add a family member (portal.family.edit): an adult of the family, or someone the church gave it
canConfirmboolWhether the "Confirm your family details" card is offered (portal.family.confirm)
canSeeContactsboolWhether the other members' email and mobile are filled in (portal.family.contacts.view)
countriesmapCountry code β†’ country name, for the address form's <select>
familyRoleslist{id, name} for each family role, for the "add a family member" form
defaultNewMemberRoleIdintThe role that form starts on β€” the configured child role, not head of household
familySummaryobjectOn the home page only: {name, memberCount}, or null when the member has no family
profileobjectOn the home page too: the same profile the Profile page gets, or null for an account with no person record

A member with no family​

/portal/family, /portal/family/edit and /portal/family/confirm all render family/none.html.twig when the acting member has no family record β€” and when the account has no person record at all. It is an ordinary portal page: HTTP 200, the usual chrome, "My Family" still the active navigation entry. Only URLs that really do not exist get errors/404.html.twig.

VariableTypeNotes
officeEmailstringAdmin β†’ Church Information's email. Empty when unset β€” leave the line out rather than linking to nowhere
officePhonestringThe church's phone, exactly as it was typed. Print this
officePhoneHrefstringThe same number reduced to what a tel: link can dial β€” digits, plus a leading + for an international number. Empty when the church configured no phone, or typed one with no digits in it

With neither configured the system theme drops both lines and says only "Please contact the church office."

The home page's Profile card​

The card prints the member's own details rather than a sentence describing them. It reads them out of profile β€” the very view-model profile/index.html.twig renders, so the two pages can never disagree β€” and skips every empty field: with nothing on file it says "No contact details on file yet." The birthday follows the Profile page and appears only while profile.canEditBirthday is true, and the family role is shown only when profile.familyId is non-zero. Values sit in <dd data-field="…"> inside #portal-home-profile-details, with the same field names the Profile page uses.

teams, team and occurrence (My Teams)​

teams is the list My Teams renders, one entry per team this member runs, ordered by ministry then team.

FieldTypeWhat it is
idintThe team
namestringThe team's name
ministryId / ministryNameint / stringThe ministry above it
activeboolFalse for a deactivated team; the card says so
positionCountintHow many positions the team owns, active or not
nextOccurrenceobject{id, date} for the soonest scheduled date from today, or null
urlstringThe team's page, root-path aware

team on the team page is {id, name, description, active, ministryId, ministryName, classGroupName, sundaySchool} β€” description is '' when the team has none, classGroupName is the Sunday School class the team is linked to ('' when none), and sundaySchool says whether the ministry provides Sunday School teachers. On the occurrence page team is {id, name, ministryId, ministryName}.

occurrence is {id, scheduleName, status, date, start, end, eventId, eventTitle, eventLocation, offsetNote}. status is 'scheduled' or 'cancelled'; start is YYYY-MM-DD HH:MM and end is HH:MM, both '' for an occurrence with no resolved window; eventId is 0 when the date is not linked to a calendar event, and the two event fields are '' then. offsetNote is the schedule's volunteer times in words, '' when volunteers keep the event's own times. headcount is the linked event's read-only headcount, {recorded, total, counts[{name, count}], editPath, roster{checkedIn, members}}, or null without an event.

The two theme-failure pages are always rendered from the system theme, so a broken theme cannot break the page that reports it. A theme may still override them β€” its version is used everywhere except when that theme is the one that failed.

The home page's calendar card​

upcomingEvents is the next three events from the calendars the church shares β€” {title, when, start, allDay, calendarName}, where when is a date string in the installation's own format and start the raw local start. The system theme prints when inside <time datetime="{{ event.start }}" data-format="daytime"> (day for an all-day event), which the portal's script rewrites in the church's locale ("Sunday, October 4 at 9:30 AM"), matching the volunteering cards. It is empty when nothing is coming up, and the system theme then says "Nothing is on the calendar just now." hasVisibleCalendars is the same as portal.showCalendar.

The card is only rendered when portal.showCalendar is on, that is while the church shares at least one calendar with members.

The calendar page​

calendars is the legend: {key, name, color, isMine} for each calendar an administrator switched on, in the order People β†’ Admin β†’ Member Portal β†’ Calendars lists them, with color a CSS colour ready for a swatch and key the calendar:<id> / system:<id> string that every event of that calendar carries. hasCalendars is false when nothing is shared, and the page then says so instead of drawing a grid. Members cannot open the page at all then, so this is only a safeguard.

The events are not in the template. FullCalendar fetches GET /api/portal/calendar/events?from=…&to=… for the window it is showing, so paging through months costs one small request each. An override must therefore keep three things, which the page's bundle looks for:

KeepWhy
<div id="portal-calendar">Where FullCalendar renders
<section id="portal-calendar-detail"> and its portal-calendar-detail-* idsThe panel an event click fills in β€” title, when, where, calendar, details
window.CRM.portalCalendar = {{ calendarConfigJson }} plus asset('/skin/v2/portal-calendar.min.js')The endpoint, the church's timezone, the window cap, and the two subscription endpoints

Each legend entry may also be a switch. A <button type="button" data-calendar-key="{{ calendar.key }}" aria-pressed="true"> hides and shows that calendar's events without reloading, and the bundle remembers the choice in the member's browser (localStorage, key churchcrm.portal.calendar.hidden). The bundle sets aria-pressed itself; style the off state with [aria-pressed="false"]. The default theme sets the swatch colour as --portal-calendar-swatch on the swatch, so the off state can draw it hollow. A legend without such buttons stays a plain legend and every event is shown, whatever the browser stored earlier.

Subscribing to the calendar​

The Subscribe button opens a dialog where a member ticks the calendars they want in their own calendar app and gets one address back. The bundle draws the checkboxes and fills in the address from GET /api/portal/calendar/subscription, so none of it is server-rendered: the feed address is a bearer secret and is fetched only when the dialog opens.

A theme that keeps the feature must keep these ids:

KeepWhat it is
#portal-calendar-subscribeThe button that opens the dialog
#portal-calendar-subscribe-dialogThe dialog itself
#portal-calendar-subscribe-formA <form> carrying {{ csrf_field() }} β€” the bundle reads the token out of it
#portal-calendar-subscribe-choicesThe empty container the checkboxes are drawn into
#portal-calendar-subscribe-errorWhere a refused save is reported
#portal-calendar-subscribe-save, #portal-calendar-subscribe-closeSave, and dismiss
#portal-calendar-subscribe-resultThe address block, hidden until there is an address
#portal-calendar-subscribe-urlA read-only <input> holding the feed address
#portal-calendar-subscribe-copyCopy to clipboard (falls back to selecting the text)
#portal-calendar-subscribe-open-rowThe paragraph holding the link below. Starts hidden; the bundle reveals it only when the feed address is https
#portal-calendar-subscribe-openAn <a> whose href the bundle sets to the webcal:// address
#portal-calendar-subscribe-manual-hintThe sentence shown instead of that link when the site is on plain http β€” Apple's calendar clients rewrite webcal:// to https:// and never fall back, so the one-tap link cannot work there
#portal-calendar-subscribe-resetOpens the confirmation below
#portal-calendar-reset-dialog with #portal-calendar-reset-confirm / #portal-calendar-reset-cancel"Get a new calendar address?"

A theme that wants none of this drops the button and both dialogs together; the bundle does nothing when the button is absent.

calendarConfigJson is a pre-rendered fragment like the four above: print it inside a <script nonce="{{ nonce() }}"> without |escape and without |raw. Link asset('/skin/v2/portal-calendar.min.css') from head_extra β€” that is FullCalendar's own stylesheet, not portal styling.

A theme that would rather draw its own calendar can drop all of this and call the same endpoint itself; it is session-gated and needs no token.

The volunteering pages​

showVolunteering is true when the installation offers the volunteering pages; the home page renders its "My volunteering" card only then. activeTab is 'schedule' or 'opportunities' and is what the tab partial highlights.

The two volunteering pages are container markup and nothing else. Their ids β€” #volunteer-my-schedule, #assignments-loading / -error / -empty / -content, #substitute-modal and friends on one page; #volunteer-opportunities, #help-wanted-section / -content, #opportunities-loading / -error / -empty / -content on the other β€” are read by skin/v2/portal-volunteer-schedule.min.js and skin/v2/portal-volunteer-opportunities.min.js, which fill them from /api/ministries/me/*. A theme overriding either template must keep every id, or the page renders empty. Override the wrapper, the headings and the surrounding layout freely.

The team and occurrence pages are container markup too. teams/team.html.twig is filled by skin/v2/portal-teams.min.js and teams/occurrence.html.twig by skin/v2/ministries-occurrence.min.js β€” the admin occurrence page's bundle, unchanged. Both address their markup by id, and those ids are deliberately the same ones the admin ministry and occurrence views carry, so the same components can draw either. A theme overriding one of these templates must keep every id it finds there: volunteerPositionsTable, volunteerQualificationsTable, volunteerSchedulesTable, volunteerOccurrencesTable and their -loading / -error / -empty / -table-wrapper state blocks; positionModal and scheduleModal with their *-form-* fields; and on the occurrence page requirements-*, swaps-*, volunteer-assign-modal and volunteer-needs-modal. Override the wrapper, the headings, the tab strip and the surrounding layout freely.

A control a theme removes is not an error: every one of those bundles looks its controls up by id and does nothing when one is absent. That is how the portal's own templates leave out the things a team leader may not do.

Email History​

email/index.html.twig is a paginated list of what the church has emailed this member β€” reached from the header's account menu, not from the main navigation, so no nav entry is active while it is open. Only mail that was sent is listed, and rows carry no delivery status: queued, failed and skipped mail is for staff, and an unsent row's detail URL is the same 404 as somebody else's.

emails is the page's rows, newest first. Every field is a finished string; nothing here needs formatting or reasoning about in a template:

FieldTypeNotes
idintUse it to build the detail URL
subjectstringEmpty for an email that was sent without one β€” print (no subject)
kindLabelstringThe kind in words: Message, Birthday greeting, Password reset link, …
addressstringThe address the message went to
dateSentstringFormatted in the installation's date format, with the time
hasBodyboolFalse for the account emails, whose content is never stored

page, pages and total drive "Page X of Y"; previousUrl and nextUrl are query strings (?page=2) and are empty strings at the ends of the list, which is how the template knows not to draw that link. The list is server-rendered β€” there is no bundle on this page β€” but the same rows are available to a theme that would rather fetch them, at GET /api/portal/me/emails?page=&limit=.

The list is one <table class="portal-table"> at every width. On a phone _portal.scss unrolls it into a stack of blocks, taking each cell's column name from its data-label attribute, so an override that keeps the table markup gets the phone layout for free.

email/show.html.twig is one email: email is a single row in the shape above, hasBody says whether there is anything to show, and body is the stored HTML of the message.

body goes in exactly one place: the srcdoc of an iframe with an empty sandbox attribute. It is markup somebody else wrote, kept as it was sent. Twig's autoescaping is what makes the attribute safe; |raw on it, or printing it anywhere in the document, hands a member's browser foreign markup with the portal's own origin behind it. The frame does not grow to fit its content β€” an empty sandbox puts the document in its own opaque origin, so its height cannot be measured from the page, and the two ways to measure it (allow-same-origin, or a script inside the frame) are the two permissions this page must not grant. It scrolls instead.

Scope: the page shows only the rows addressed to this person.

The signed-out pages​

The sign-in pages, the registration page and the email-confirmation page work without a session. They extend layout.html.twig with an empty nav block, and member.id is 0 on them, so the header draws no account menu.

Every login/* page except login/unavailable.html.twig gets these sign-in page variables:

VariableTypeNotes
loginUrlstring/portal/login, root-path aware. Forms post to it and to {{ loginUrl }}/code
offerRememberDeviceboolWhether "This is my own device" is offered: false when the church set Keep me signed in (days) to 0
memberSignInEnabledboolWhether member sign-in is on

login/request.html.twig also gets email and emailError (the typed address and its message after a refused post), passkeySignIn (passkeys are on and this site address can use them: draw the passkey button and load asset('/skin/v2/portal-passkeys.min.js')), selfRegistrationEnabled, and guestPage: 'login'. The page reads the same whatever address was typed; an override must not add anything that tells the two apart.

guestPage is how the header decides its signed-out links: a page with guestPage other than 'login' offers Sign in while memberSignInEnabled is true, and one other than 'register' offers Register your family while selfRegistrationEnabled is true. login/unavailable.html.twig sets guestPage: 'register', because it carries its own Register your family button and a Church leader sign-in link to /admin/.

login/code.html.twig gets codeError. login/confirm.html.twig gets firstName, churchName and confirmUrl, the address its form posts to: opening the page must change nothing, so keep the sign-in a form post. login/failed.html.twig gets passkey, true after a passkey that signed nobody in. Every form here carries {{ csrf_field() }}.

register/index.html.twig is container markup for FamilyRegister.js: familyRoles is [{id, name}], phoneFormat and phoneFormatCell are the input masks, and defaults is {city, state, zip, country} from the church's address defaults. Keep the ids listed under Hooks the page bundles look for.

email-change/confirm.html.twig draws one of three states: confirm (a form that posts back to /portal/email/confirm/{{ token }}), done or invalid. kind is change when the link went to the new address and confirm when it went to the address the member last signed in with.

Sign-in and devices​

devices/index.html.twig. Every date arrives formatted.

VariableTypeNotes
deviceslist{id, label, addedAt, lastUsedAt, isThisDevice} for each remembered device; label is the browser and system, e.g. Chrome Β· Windows
offerRememberDeviceboolAs on the sign-in pages
passkeysOnboolWhether the church allows passkeys; without it, leave the passkey section out
passkeyslist{id, label, addedAt, lastUsedAt}; lastUsedAt is empty for a passkey never used
passkeyAddProblemstringWhy a passkey cannot be added right now, in words for the member (for example, more than 15 minutes after the email sign-in); empty when it can
emailToConfirmstringAfter a passkey sign-in, an unconfirmed address the member may confirm with Email me a confirmation link; empty otherwise

Each sign-out and removal is a plain form post to /portal/devices/{id}/sign-out, /portal/devices/passkeys/{id}/remove, /portal/devices/sign-out-everywhere or /portal/devices/confirm-email, each with {{ csrf_field() }}.

Directory​

directory/index.html.twig lists what People β†’ Admin β†’ Member Portal β†’ Directory chooses to share; a detail the church does not show arrives as '' or an empty list.

VariableTypeNotes
groupslist{letter, entries}, A to Z
entryCountintHow many entries there are in all
browseboolfalse when the church allows search only: groups then holds only the matches for query, and nothing before a search
querystringWhat was searched for (?q=)
truncatedboolSearch only: more than searchLimit matched and only the first ones are listed
searchMinLength, searchLimitintThe shortest search answered (2) and the most matches shown (20)

An entry is {kind, id, name, searchText, photoUrl, initials, address, mailingAddress, homePhone, anniversary, members}, where kind is family or person and address and mailingAddress are lists of lines. A member is {id, name, photoUrl, initials, birthday, homePhone, cellPhone, workPhone, email, workEmail}.

My Giving​

giving/index.html.twig: isHousehold is true for an adult of the family, who gets the year-end statement form; anyone else gets only the line telling them to ask the church office. years is {value, label, hasGiving} for each year from the one the family was entered in to the current one, newest first, and year is the one selected at first: last year, or the family's first year when it is newer. The form is a plain GET to /portal/giving/statement?year=, which answers with a PDF.


Compatibility​

Core may add a block, a variable or a global at any time; that never breaks a theme. Renaming or removing one is called out in the release notes, and the old name keeps working for one release.

The validator's "this version of ChurchCRM does not use a template at this path" warning is how a theme finds out that a template it overrode has moved β€” run Check on People β†’ Admin β†’ Member Portal β†’ Themes after upgrading.

Can't find what you need? Ask in Discord, or open an issue on the ChurchCRM repository.