2016-01-18 29 views

回答

4

我覺得current_tags是你在找什麼:

裏面collection.liquid,current_tags包含用於篩選集合所有產品標籤

對於URL collections/some-collection/tag1,current_tags包含tag1

請注意,current_tags是一個數組,可能包含多個標記。例如,該URL有3個當前標籤:collections/some-collection/tag1+tag2+tag3

+0

那麼如何從current_tags數組中挑選出一個標籤呢? –

+0

您可以使用['first'](https://docs.shopify.com/themes/liquid-documentation/filters/array-filters#first)或[index](https://docs.shopify.com /主題/液體的文檔/濾波器/陣列的濾波器#索引)。 –

+0

謝謝!我會嘗試的! –

相關問題