> ## Documentation Index
> Fetch the complete documentation index at: https://translations.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Phone Templates でサポートされる Liquid 構文

> phone templates でサポートされる Liquid のタグ、フィルター、一般的な変数について説明します。

Liquid 構文の概要については、[LiquidJS introduction](https://liquidjs.com/tutorials/intro-to-liquid.html) を参照してください。そこでは、Liquid の 2 種類のマークアップが簡潔に説明されています。

* **出力**。HTML を出力します。

  出力の構文は、`{{` と `}}` で囲まれた変数または値と、必要に応じて指定するフィルターの一覧です。たとえば、`{{ user.name }}` です。

* **タグ**。テンプレートのレンダリングを制御し、ロジックを実装します。

  タグの構文は、`{%` と `%}` で囲まれたタグ名と、必要に応じて指定する引数です。たとえば、`{% if user_metadata.lang == 'it' %} Ciao! {% endif %}` です。

このページでは、phone templates でサポートされているタグ、フィルター、変数を一覧で紹介します。

<div id="tags">
  ## タグ
</div>

すべての phone templates で、次の Liquid タグをサポートしています。

| Category | Tags                                    |
| -------- | --------------------------------------- |
| 繰り返し     | `for`, `cycle`, `tablerow`              |
| 制御フロー    | `if`, `unless`, `elsif`, `else`, `case` |
| 変数       | `assign`, `increment`, `decrement`      |
| ファイル     | `include`, `layout`                     |
| 言語       | `raw`, `comment`                        |

Liquid タグの説明と例は、[LiquidJS のタグページ](https://liquidjs.com/tags/overview.html) で確認できます。

<div id="filters">
  ## フィルター
</div>

すべての phone templates で、以下の Liquid フィルターを利用できます。

| カテゴリー    | フィルター                                                                                                                                                                                              |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 数値       | `plus`, `minus`, `modulo`, `times`, `floor`, `ceil`, `round`, `divided_by`, `abs`, `at_least`, `at_most`                                                                                           |
| 文字列      | `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`                                                                                                                 |
| 配列       | `slice`, `map`, `sort`, `sort_natural`, `first`, `last`, `join`, `reverse`, `size`                                                                                                                 |
| 日付       | `date`                                                                                                                                                                                             |
| その他      | `default`                                                                                                                                                                                          |

Liquid フィルターの説明と使用例は、[LiquidJS filters page](https://liquidjs.com/filters/overview.html)で確認できます。

<div id="general-variables">
  ## 一般的な変数
</div>

特に注記がない限り、以下の変数はすべての phone templates の **Text Message Template** フィールドで使用できます。

`logo_url` のような URL ベースのプロパティは、セキュリティリスクを軽減するため、自動的に URL エスケープされます。電話番号は、US の電話番号を除き、国番号プレフィックス (`+<country_code>`) 付きで保存されます。US の電話番号では国番号プレフィックスが省略される場合があります。

* [Tenant Settings](https://manage.auth0.com/#/tenant) で定義されるテナント関連の情報:
  * `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.name` や `application.client_metadata` などの標準的なクライアントプロパティにアクセスできます

* ユーザーが [組織](/docs/ja-jp/manage-users/organizations/organizations-overview) を介してログインする場合は、以下の追加変数も使用できます:
  * `organization.id`
  * `organization.name`
  * `organization.display_name`
  * `organization.metadata`
  * `organization.branding.logo_url`
  * `organization.branding.colors.primary`
  * `organization.branding.colors.page_background`

* 複数の <Tooltip tip="カスタムドメイン: 特別な、または独自の名前を持つサードパーティドメイン。" cta="用語集を見る" href="/docs/ja-jp/glossary?term=custom+domains">カスタムドメイン</Tooltip> 変数:
  * `custom_domain.domain`：テナントのドメイン名
  * `custom_domain.domain_metadata`：カスタムドメインのメタデータフィールド (キーと値のペア)
