-
出力。HTMLを出力します。
出力の構文は、変数または値と、必要に応じて指定するフィルターのリストを
{{と}}で囲んだものです。例:{{ user.name }}。 -
タグ。テンプレートのレンダリングを制御し、ロジックを実装します。
タグの構文は、タグ名と必要に応じた引数を
{%と%}で囲んだものです。例:{% if user_metadata.lang == 'it' %} Ciao! {% endif %}。
| カテゴリ | タグ |
|---|---|
| 反復 | for, cycle, tablerow |
| 制御フロー | if, unless, elsif, else, case |
| 変数 | assign, increment, decrement |
| ファイル | include, layout |
| 言語 | raw, comment |
フィルター
| Category | Filters |
|---|---|
| Math | plus, minus, modulo, times, floor, ceil, round, divided_by, abs, at_least, at_most |
| String | append, prepend, capitalize, upcase, downcase, strip, lstrip, rstrip, strip_newlines, split, replace, replace_first, remove, remove_first, truncate, truncatewords |
| HTML/URI | escape, escape_once, url_encode, url_decode, strip_html, newline_to_br |
| Array | slice, map, sort, sort_natural, first, last, join, reverse, size |
| Date | date |
| Misc | default |
一般的な変数
logo_url などの URL ベースのプロパティは、セキュリティリスクを軽減するために自動的に URL エスケープされます。電話番号は、米国の電話番号を除き、国番号プレフィックス (+<country_code>) 付きで保存されます。米国の電話番号では、国番号プレフィックスが省略される場合があります。
-
Tenant Settings で定義されるテナント関連情報:
tenant(生のテナント名)friendly_namesupport_emailsupport_urllogo_urlhome_urlregion
-
locale(/authorizeリクエストのui_localクエリパラメーターに基づきます) -
code(blocked_accountテンプレートでは使用不可) -
connection(データベース接続名) -
以下の
user変数:user.nameuser.nicknameuser.given_nameuser.family_nameuser.pictureuser.login_countuser.user_metadata(ユーザー設定など、ユーザーの中核機能に影響しないユーザー属性)user.app_metadata(アプリケーションの動作やユーザーがアクセスできる対象など、ユーザーの中核機能に影響する可能性があるユーザー属性。サポートプラン、セキュリティロール、アクセス制御グループなどを含みます)user.email_verifieduser.emailuser.phone_numberuser.phone_verifieduser.multifactoruser.source_ipuser.countryuser.city
-
以下の
client変数:nameclientIDmetadata
-
applicationオブジェクト (application.nameやapplication.client_metadataなどの標準的なクライアントプロパティにアクセスできます) -
ユーザーが 組織 経由でログインした場合は、次の追加変数も使用できます:
organization.idorganization.nameorganization.display_nameorganization.metadataorganization.branding.logo_urlorganization.branding.colors.primaryorganization.branding.colors.page_background
-
複数の変数:
custom_domain.domain(テナントのドメイン名)custom_domain.domain_metadata(カスタムドメインのメタデータフィールド (キーと値のペア) )