Created
September 21, 2020 18:28
-
-
Save junaidkbr/a5e8898f7b7397570a1ae27019f7ba5b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
Get page handle based on page type | |
{% endcomment %} | |
{% liquid | |
assign page_handle = '' | |
assign page_type = request.page_type | |
case page_type | |
when 'index' | |
assign page_handle = 'index' | |
when 'page' | |
assign page_handle = page.handle | |
when 'product' | |
assign page_handle = product.handle | |
when 'list-collections' | |
assign page_handle = 'all-collections' | |
when 'collection' | |
assign page_handle = collection.handle | |
when 'article' | |
assign page_handle = article.handle | |
endcase | |
%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment