# トップページを固定ページにする方法について教えてください。

**URL:** <https://community.shopify.com/t/topic/27795>\
**Category:** 技術的なQ＆A\
**Created:** [December 10, 2020, 1:15am UTC](https://community.shopify.com/t/topic/27795 "2020-12-10T01:15:19Z")\
**Posts on this page:** 5\
**Page:** 1

## AI-generated summary

Shopify内で、トップページをコーポレートサイト風の固定的な内容にし、EC機能を別URL配下に見せたい構成についての相談。想定していたのは、コーポレート側をルートドメイン、EC側をサブドメインまたはサブディレクトリに置く形だった。 

回答では、Shopifyのトップページ自体をコーポレート用途に使い、必要なら買い物導線は別の固定ページ配下に置く構成が現実的だと案内された。例として、トップを企業案内、ショップ導線を /pages/shop のようなURLに置く方法が示された。 

技術的には、theme.liquid は決済ページ以外で共通利用されるレイアウトで、各ページ種別のテンプレートは {{ content_for_layout }} を通じて読み込まれるとの説明があった。トップページは Templates/index.liquid が対象で、Debutテーマでは {{ content_for_index }} を削除すれば静的ページ化しやすいと補足された。 

最終的に、質問者は案内どおり実装できたと報告しており、議論は解決済み。

<div class="post-metadata">

**Author:** ![NaotoNakashima](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@NaotoNakashima](https://community.shopify.com/u/NaotoNakashima)\
**Post date:** [December 10, 2020, 1:15am UTC](https://community.shopify.com/t/topic/27795/1 "2020-12-10T01:15:19Z")

</div>

お世話になります。

顧客からECサイトを作って欲しいが、  
トップページはコーポレートサイト にして欲しい、  
と要望があります。

顧客のサイトは全て、Shopify内で制作したいと考えております。

そこで教えたいただきたいのですが、  
トップページを固定ページにして、  
ShpifyのECサイト部分をサブドメインもしくはサブディレクトリにすることは可能ですか？

私のイメージでは、  
コーポレートサイト部分：（[https://www.aaa.com/）](https://www.aaa.com/%EF%BC%89)  
ECサイト部分 ：（[https://www.store.aaa.com/）](https://www.store.aaa.com/%EF%BC%89)  
で考えております。

もし不可能であれば、  
顧客に対応できる案があれば教えていただけると幸いです。

よろしくお願いいたします。

---

<div class="post-metadata">

**Author:** ![Anonymous\_44fbe07fc59d9ccaacd70575fd5a5155](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/anonymous_44fbe07fc59d9ccaacd70575fd5a5155/32/194200_2.png) [@Anonymous\_44fbe07fc59d9ccaacd70575fd5a5155](https://community.shopify.com/u/Anonymous_44fbe07fc59d9ccaacd70575fd5a5155)\
**Post date:** [December 10, 2020, 12:28pm UTC](https://community.shopify.com/t/topic/27795/2 "2020-12-10T12:28:22Z")

</div>

恐らくベストな構成は、Shopifyのトップページをコーポレートとして使用し、

もしどうしてもショッピング部分をトップに持って来たくない場合、ショッピングのトップを固定ページで作成されると良いと思います。

[https://www.xxx.com/(top)](https://www.xxx.com/(top))

[https://www.xxx.com/pages/shop/(store)](https://www.xxx.com/pages/shop/(store))

の構成です

---

<div class="post-metadata">

**Author:** ![NaotoNakashima](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@NaotoNakashima](https://community.shopify.com/u/NaotoNakashima)\
**Post date:** [December 11, 2020, 12:31am UTC](https://community.shopify.com/t/topic/27795/3 "2020-12-11T00:31:21Z")

</div>

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

Shopifyのトップページをコーポレートサイト にする場合、

１．theme.liquidをTemplatesのディレクトリにコピーする。  
２．theme.liquidを固定ページのコードに書き換える。

というイメージで合っていますか？

---

<div class="post-metadata">

**Author:** ![\_osamu\_iwasaki](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/_osamu_iwasaki/32/272617_2.png) [@\_osamu\_iwasaki](https://community.shopify.com/u/_osamu_iwasaki)\
**Post date:** [December 15, 2020, 7:16am UTC](https://community.shopify.com/t/topic/27795/4 "2020-12-15T07:16:36Z")

</div>

**Layout / theme.liquid** は、決済ページ以外の全てに共通して使うものになります。

この中に **{{ content\_for\_layout }}** というタグがありますが、ここに様々なページのTemplatesが読み込まれます。

トップページであれば、 **Templates / index.liquid** 、  
商品ページであれば、 **Templates / product.liquid** 、  
ブログページであれば、 **Templates / blog.liquid** 等となります。

例えばDebutテーマであれば、index.liquidの中に **{{ content\_for\_index }}** というタグがありますが、  
静的ページにしたいのであれば、こちらは削除して構いません。

---

<div class="post-metadata">

**Author:** ![NaotoNakashima](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@NaotoNakashima](https://community.shopify.com/u/NaotoNakashima)\
**Post date:** [December 16, 2020, 1:48am UTC](https://community.shopify.com/t/topic/27795/5 "2020-12-16T01:48:59Z")

</div>

ご返答ありがとうございます。

うまく出来ました。

お忙しい中、ありがとうございました。
