メインコンテンツへスキップ
Liquid構文の概要については、LiquidJS introductionを参照してください。そこでは、Liquidの2種類のマークアップが簡潔に説明されています。
  • 出力。HTMLを出力します。 出力の構文は、変数または値と、必要に応じて指定するフィルターのリストを {{}} で囲んだものです。例: {{ user.name }}
  • タグ。テンプレートのレンダリングを制御し、ロジックを実装します。 タグの構文は、タグ名と必要に応じた引数を {%%} で囲んだものです。例: {% if user_metadata.lang == 'it' %} Ciao! {% endif %}
このページでは、電話番号テンプレートでサポートされるタグ、フィルター、変数を一覧で示します。

タグ

すべての電話番号テンプレートで、次の Liquid タグを使用できます。
カテゴリタグ
反復for, cycle, tablerow
制御フローif, unless, elsif, else, case
変数assign, increment, decrement
ファイルinclude, layout
言語raw, comment
Liquid タグの説明と例は、LiquidJS tags pageで確認できます。

フィルター

すべての電話番号テンプレートで、次の Liquid フィルターをサポートしています。
CategoryFilters
Mathplus, minus, modulo, times, floor, ceil, round, divided_by, abs, at_least, at_most
Stringappend, prepend, capitalize, upcase, downcase, strip, lstrip, rstrip, strip_newlines, split, replace, replace_first, remove, remove_first, truncate, truncatewords
HTML/URIescape, escape_once, url_encode, url_decode, strip_html, newline_to_br
Arrayslice, map, sort, sort_natural, first, last, join, reverse, size
Datedate
Miscdefault
Liquid フィルターの説明と例については、LiquidJS filters pageを参照してください。

一般的な変数

特に明記がない限り、以下の変数は、すべての電話番号テンプレートの Text Message Template フィールドで使用できます。 logo_url などの URL ベースのプロパティは、セキュリティリスクを軽減するために自動的に URL エスケープされます。電話番号は、米国の電話番号を除き、国番号プレフィックス (+<country_code>) 付きで保存されます。米国の電話番号では、国番号プレフィックスが省略される場合があります。
  • Tenant Settings で定義されるテナント関連情報:
    • tenant (生のテナント名)
    • friendly_name
    • support_email
    • support_url
    • logo_url
    • home_url
    • region
  • locale (/authorize リクエストの ui_local クエリパラメーターに基づきます)
  • code (blocked_account テンプレートでは使用不可)
  • connection (データベース接続名)
  • 以下の user 変数:
    • user.name
    • user.nickname
    • user.given_name
    • user.family_name
    • user.picture
    • user.login_count
    • user.user_metadata (ユーザー設定など、ユーザーの中核機能に影響しないユーザー属性)
    • user.app_metadata (アプリケーションの動作やユーザーがアクセスできる対象など、ユーザーの中核機能に影響する可能性があるユーザー属性。サポートプラン、セキュリティロール、アクセス制御グループなどを含みます)
    • user.email_verified
    • user.email
    • user.phone_number
    • user.phone_verified
    • user.multifactor
    • user.source_ip
    • user.country
    • user.city
  • 以下の client 変数:
    • name
    • clientID
    • metadata
  • application オブジェクト (application.nameapplication.client_metadata などの標準的なクライアントプロパティにアクセスできます)
  • ユーザーが 組織 経由でログインした場合は、次の追加変数も使用できます:
    • organization.id
    • organization.name
    • organization.display_name
    • organization.metadata
    • organization.branding.logo_url
    • organization.branding.colors.primary
    • organization.branding.colors.page_background
  • 複数の変数:
    • custom_domain.domain (テナントのドメイン名)
    • custom_domain.domain_metadata (カスタムドメインのメタデータフィールド (キーと値のペア) )