LoginSignup
1
0

More than 1 year has passed since last update.

【Shopify】現在見ているページのファイルを調べる方法

Posted at

テーマを開発/カスタマイズする際は、どのtemplates内ファイルが読み込まれているか知る必要があります。

例えば
トップページ → templates/index.liquid
コレクション一覧 → templates/collection.liquid
など。

これらはlayout/theme.liquid内のscriptタグの中で下記のコードを入れることで知ることができます。

<script>
console.log('{{template}}');
//or
alert('{{template}}');
</script>

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0