Saltar al contenido
Context
<sessions-context>

An invisible wrapper, and the element you should generally reach for first. Put any combination of Sessions embeds inside a single <sessions-context> and they share one GraphQL client (and its cache), one localization instance, and — when a visitor signs in through one embed — one auth session across all of them. Prefer setting business and auth (and the --sessions-* branding custom properties — see the Branding API) once on the context rather than duplicating them onto each nested embed: the children inherit them, so adding another embed later is a one-liner. Even with a single embed, wrapping it in <sessions-context> is the forward-compatible default.

Instalar

<script type="module" src="https://go.sessions.website/embeds/unstable/context.js"></script>
<sessions-context
  business="ottawa-volleyball"
>
  <sessions-schedule></sessions-schedule>
</sessions-context>

Atributos

Edita cualquier atributo de abajo — el snippet de arriba y la vista previa en vivo al lado se reconstruyen en el sitio.

business : string

Default business handle shared with every child embed that doesn’t set its own.

auth : token

Embed-scoped JWT shared with every child embed. Updated in place when a visitor signs in through any child.

persist : boolean

When present, persists the signed-in auth token to localStorage (scoped by business handle) so the session survives reloads.