# Pageテンプレートのページネーションについて

**URL:** <https://community.shopify.com/t/page/186091>\
**Category:** 技術的なQ＆A\
**Created:** [January 24, 2023, 9:17am UTC](https://community.shopify.com/t/page/186091 "2023-01-24T09:17:50Z")\
**Posts on this page:** 3\
**Page:** 1

## AI-generated summary

ユーザーがPageテンプレートでメタフィールド（Bonify Custom Fields）を使用してページネーションを実装しようとしたところ、エラーが発生しました。

**エラー内容:**
- "Array 'page.metafields["custom_fields"]["gallery"]' is not paginateable."
- メタフィールドの配列に対してpaginateタグを適用しようとした際に発生

**結論:**
- メタフィールドからのページネーション作成は不可能
- Shopify公式ドキュメントによると、ページネーション可能な配列は限定されている

**ページネーション可能な配列:**
- all_products
- article.comments
- blog.articles
- collections
- collection.products
- customer.orders
- customer.addresses
- search.results
- pages
など、特定のShopifyオブジェクトのみ対応

カスタムメタフィールドの配列は対象外のため、別の実装方法を検討する必要があります。

<div class="post-metadata">

**Author:** ![keika](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@keika](https://community.shopify.com/u/keika)\
**Post date:** [January 24, 2023, 9:17am UTC](https://community.shopify.com/t/page/186091/1 "2023-01-24T09:17:50Z")

</div>

以下のような形で、ページテンプレート上でメタフィールド（Bonify Custom Fields）を使用してページネーションを実装できればと思っておりますが、ページ分割できませんと怒られてしまいました。

エラー：“Liquid error: Array ‘page.metafields[“custom\_fields”][“gallery”]’ is not paginateable.”

メタフィールドの情報からページネーションを作成することは不可でしょうか？

ご教示いただけますと幸いです。

```auto
{% paginate page.metafields["custom_fields"]["gallery"] by 1 %}　
　{% for item in page.metafields["custom_fields"]["gallery"] %}
　　（～省略～）
     {% endfor %}
   {% render 'pagination', paginate: paginate, anchor: '' %}
 {% endpaginate %}

```

---

<div class="post-metadata">

**Author:** ![Jizo\_Inagaki](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/jizo_inagaki/32/149480_2.png) [@Jizo\_Inagaki](https://community.shopify.com/u/Jizo_Inagaki)\
**Post date:** [January 24, 2023, 10:21pm UTC](https://community.shopify.com/t/page/186091/2 "2023-01-24T22:21:18Z")

</div>

不可能だと思います。

以下のドキュメントを参照してください。

[https://shopify.dev/api/liquid/tags/paginate](https://shopify.dev/api/liquid/tags/paginate)

---

<div class="post-metadata">

**Author:** ![keika](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@keika](https://community.shopify.com/u/keika)\
**Post date:** [January 25, 2023, 1:25am UTC](https://community.shopify.com/t/page/186091/3 "2023-01-25T01:25:15Z")

</div>

ご回答ありがとうございます！

以下の配列しか、ページ付けできない。ということですね、、

ご丁寧にURLまでご共有いただきありがとうございました。大変助かりました。

all\_products

article.comments

blog.articles

collections

collection.products

customer.addresses

customer.orders

pages

search.results

collection\_list

product\_list
