Created
December 1, 2020 23:06
-
-
Save IliasHad/9076798bd095aa175984cdfa9b6112f8 to your computer and use it in GitHub Desktop.
This file contains 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
{%- capture contentForQuerystring -%}{{ content_for_header }}{%- endcapture -%} | |
{%- assign pageUrl = contentForQuerystring | split:'"pageurl":"' | last | split:'"' | first | split:'.myshopify.com' | last | | |
replace:'\/','/' | | |
replace:'%20',' ' | | |
replace:'\u0026','&' | |
-%} | |
{%- assign itemShow = '' -%} | |
{%- for i in (1..1) -%} | |
{%- unless pageUrl contains "?" -%}{% break %}{%- endunless -%} | |
{%- assign pageQuerystring = pageUrl | split:'?' | last -%} | |
{%- assign parts = pageQuerystring | split:'&' -%} | |
{%- for part in parts -%} | |
{%- assign keyAndValue = part | split:'=' -%} | |
{%- if keyAndValue.size > 1 -%} | |
{% if keyAndValue[0] == param %}{{keyAndValue[1]}}{% endif %}{%- endif -%}{%- endfor -%}{%- endfor -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment